-
Notifications
You must be signed in to change notification settings - Fork 567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Subwindow updates #1532
Subwindow updates #1532
Conversation
…so the window origin is correct for descendents.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great. a few little things inline but nothing major. Thanks!
doc fix Co-authored-by: Colin Rofls <[email protected]>
doc fix Co-authored-by: Colin Rofls <[email protected]>
doc fix Co-authored-by: Colin Rofls <[email protected]>
doc fix Co-authored-by: Colin Rofls <[email protected]>
@@ -13,6 +13,9 @@ You can find its changes [documented below](#070---2021-01-01). | |||
- RichTextBuilder ([#1520] by [@Maan2003]) | |||
- `get_external_handle` on `DelegateCtx` ([#1526] by [@Maan2003]) | |||
- `AppLauncher::localization_resources` to use custom l10n resources. ([#1528] by [@edwin0cheng]) | |||
- Shell: get_content_insets and mac implementation ([#XXXX] by [@rjwittams]) | |||
- Contexts: to_window and to_screen (useful for relatively positioning sub windows) ([#XXXX] by [@rjwittams]) | |||
- WindowSizePolicy: allow windows to be sized by their content ([#XXXX] by [@rjwittams]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rjwittams might want to pr something to fix these up?
@@ -156,7 +163,7 @@ impl WindowBuilder { | |||
handler: None, | |||
title: String::new(), | |||
menu: None, | |||
size: Size::new(500.0, 400.0), | |||
size: Size::new(0., 0.), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See issue #1543: because of this change, windows don't appear at all on Mac if their size are not explicitly set.
@rjwittams I am hitting a mysterious exception thrown in a cocoa paint method that bisect has tracked down to de5f88a. As far as I've tested this only happens on Catalina, although I can reproduce in runebender consistently: run the application, and then open two glyph windows; the app aborts when you try to open the second window. I'm curious to know more about the rationale of the deferring of the size & position setting; that might help me track this down a bit further. |
This was deferred in order to avoid reentrancy issues (wrt borrowing the app state I think? Due to the window handler going back into druid). |
Expose WindowLevel, add get_content_insets, track widgets window relative coordinates.
Add WindowSizePolicy to allow windows to size themselves to their content.
Make scroll contained things re layout if the scroll offset changes.
All of these are to let subwindows like dropdowns be laid out relative to their parent widget.
The drop down widget itself isn't here. It is currently in nursery locally.