Hi Michael, Yes, this works! I wrote up a quick test app and it worked fine on the Mac. I’ll try to write up a more comprehensive app but might not get around to it for a few weeks.
Thanks, Martin > On Dec 6, 2024, at 8:40 AM, Michael Strauß <michaelstr...@gmail.com> wrote: > > Hi Martin, > > I've added the `HeaderBar.overlappingSystemInset` property, which > controls whether the window buttons take up space in the layout. > Setting this property effectively ignores the system inset for layout > purposes. > > In your example, you could now place one layout container in the > "leading" area, and another layout container in the "center" area, and > assign different backgrounds to them. > > Does this solve your use case? > > > > On Fri, Nov 15, 2024 at 10:09 PM Martin Fox <mar...@martinfox.com> wrote: >> >> Michael, >> >> On the Mac a common UI layout is to have a splitter view that extends to the >> top of the window with separate toolbars in each panel. Have you given any >> thought on supporting this layout in an EXTENDED window? >> >> (I realize this is a Mac thing; Apple loves their sidebars. Microsoft >> dabbled with this design language but it seems to be fading away. I have >> seen it in a few Windows apps like 1Password.) >> >> In UIKit Apple implements this using separate views. The equivalent in >> JavaFX would be to add a separate HeaderBarBase object to the top of each >> panel in a SplitPane. That would require supporting multiple HeaderBarBase >> instances and providing an API to tell one to ignore leftSystemInset or >> rightSystemInset (or both). I like this solution since it allows the >> background visuals for each header bar to be customized. >> >> The way Apple shoe-horned this into the older AppKit is a bit less elegant. >> There’s still one NSToolbar that spans the entire window. A developer can >> add special items to the toolbar that track the dividers in an NSSplitView. >> I would let developers roll their own solutions if they want that design. >> Replicating that in JavaFX wouldn’t require any alterations to the >> HeaderBarBase class and it’s too specialized to be added to HeaderBar. >> >> Martin