Modern macOS windows

I think I saw somewhere an article explaining how to do modern Windows on macOS but I cannot find it again. For apps running macOS 11 or later.
I believe we need to use some Declare functions.

You’ll need to be a little more specific. There are a few types of modern macOS windows.

Are you trying to do a unified toolbar window like this?

Or do you mean a line-icon preferences toolbar?

What features / look are you trying to achieve?
Are you able to use plugins as a solution?

Yes, like the first example where the title is on the left. I can use PlugIns if they are compatible with API 2.

With MBS you can set the style pretty easily. Dealing with the line icons turns into a headache because of #34926 - Changing the enabled status on toolbutton erases icon

Setting the style though,

Sub Opening() Handles Opening
  // Set the toolbar style
  self.NSWindowMBS.toolbarStyle = NSWindowMBS.NSWindowToolbarStyleUnified
  self.NSToolbarMBS.displayMode = NSToolbarMBS.NSToolbarDisplayModeIconOnly
  
  // Fix the height of the window because the toolbar style and the Xojo Framework don't agree yet
  self.Height = self.Height

End Sub
2 Likes