question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Window] Add APIs for configuring the window title pane

See original GitHub issue

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 image

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
kirill-grouchnikovcommented, Apr 11, 2022

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:

  1. Marking a window to be decorated or undecorated. 2a. Marking the content of a window to extend into a custom decorated title pane area. 2b. Providing APIs to contribute decorated title pane area content that is styled consistently.

Addressing the first one would require a breaking change in AuroraWindow, replacing the Boolean decorated flag with a enum: System (default, title pane is provided by the operating system), Themed (name to be finalized, title pane is provided by Aurora), None (no title pane).

The second part is to enable the so-called “unified” title pane appearance (different UI toolkits call it a different name):

visor1 visor2

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.

1reaction
kirill-grouchnikovcommented, Nov 15, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Title bar customization - Windows apps | Microsoft Learn
By default, the title bar shows the app type as the window title (for example, "WinUI Desktop"). To change the window title, set...
Read more >
Window | Android Developers
LayoutParams) to add an additional content view to the screen. ... Retrieve the current window attributes associated with this panel. final Window.
Read more >
windows.create() - Mozilla - MDN Web Docs
A windows.CreateType value. Specifies what type of browser window to create. Specify panel or popup here to open a window without any of...
Read more >
Add option to show window titles in tasks buttons #115 - GitHub
So only running applications get text and the window title is displayed rather than the application name? And you just truncate it if...
Read more >
Window Title Bar - Finsemble
The window title bar is a component injected into every window with the config option FSBLHeader enabled. The window title bar provides standard...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found