-
Notifications
You must be signed in to change notification settings - Fork 19
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
[Window] Add APIs for configuring the window title pane #23
Comments
So I want to take a bit of time to make the right APIs for this area. From my current experience with Radiance, there are 2/3 layers to this:
Addressing the first one would require a breaking change in The second part is to enable the so-called "unified" title pane appearance (different UI toolkits call it a different name): The last part is to allow app code to add one or more title pane control buttons (in addition to minimize, maximize and close) and have those be styled consistently by Aurora. Ideally, all of these would be done in a single pass for a more coherent and cohesive API surface, so it might take a bit. |
I'm going to move this (and an additional Window-level API to allow the app to "participate" in the user decision to close the window) to version 1.3. |
Unify the two separate `AuroraWindow` composables into a single one, and update all the sample usages that allow changing skin at runtime to use the proper tracking of mutable state. The overall window API evolution planned for 1.3 is tracked by #23
* Replace `undecorated` in `AuroraWindow` with the new `AuroraWindowConfiguration` * Supports three title pane kinds - system, Aurora and none * Supports configuring horizontal gravity of the app icon, the app title and the app control buttons under Aurora pane kind * Supports configuring title pane height and vertical gravity of the control buttons For #23
After the changes that just went in for #23
Instead of a single configuration data class that provides all options, even as some of them are not relevant to a particular configuration, use a sealed hierarchy of classes for: * OS-provided title pane * No title pane * Plain Aurora title pane with configurable horizontal gravity for the app icon, app title and control buttons * Integrated Aurora title pane with configurable horizontal and vertical gravity for the control buttons, and the title pane height For #23
This is now available in 1.3-SNAPSHOT. https://github.com/kirill-grouchnikov/aurora/blob/icicle/demo/src/desktopMain/kotlin/org/pushingpixels/aurora/demo/AuroraTitlePaneDemo.kt has some sample code for configuring the positioning of app icon, title and control buttons for windows decorated by Aurora. https://github.com/kirill-grouchnikov/aurora/blob/icicle/demo/src/desktopMain/kotlin/org/pushingpixels/aurora/demo/titlepane/ChatFrame.kt is a simple example of an integrated title pane where the app content extends into the window title pane (screenshot from a couple comments above). I will add another demo in the next few days, and add documentation on using these APIs. |
From this demo |
undecorated = true
disables os decoration but adds an Aurora specific frame and title bar to the window.Aside from pure design aspects regarding the border or button icons (minimize, maximize, close), sometimes not all buttons are desired or even new, custom components are needed. The menu bar isn't always sufficient for this.
Opera GX might be a good example of what could be possible
The text was updated successfully, but these errors were encountered: