mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-17 07:44:40 +00:00
panes: the API example gives the document focus on to_document
This commit is contained in:
1 parent
4325b9ccc1
commit
9359332fd7
1 file changed
+7
-1
+7
-1
@@ -42,7 +42,13 @@ for request in out.requests {
|
||||
PaneRequest::Focus(_) => {}
|
||||
}
|
||||
}
|
||||
egui::CentralPanel::default().show(ui, |ui| document(ui));
|
||||
egui::CentralPanel::default().show(ui, |ui| {
|
||||
let response = document(ui);
|
||||
if out.to_document {
|
||||
// F6 or Shift+F6 left the panes: the document takes keyboard focus.
|
||||
response.request_focus();
|
||||
}
|
||||
});
|
||||
```
|
||||
|
||||
| Piece | Behaviour |
|
||||
|
||||
Reference in new issue
Block a user