Toolbar right justified on M1 Mac

Which is 100% doable (in early versions of BS, I shifted the buttons by a couple of pixels to make them line up correctly, which Apple solved later on). There’s also a discussion in another forum, because Apple is starting to use the right hand side of a “Panel” to display the close widget in iOS.

Which you just love, right?

The new toolbar style is quite ugly on document windows. On smaller windows like preferences windows the BS toolbar style doesn’t make any sense at all.

There is a BS Style for preferences windows.

#if targetMacOS then
  if NSObjectRespondsToSelector( self.handle, NSSelectorFromString( "setToolbarStyle:" ) ) then
    NSWindowSetToolbarStyle( self.handle ) = NSWindowToolbarStyleValue.preference
  end if

This page lists all the styles that I am aware of.

1 Like

Not suggestion anything of the sort.
Windows, Mac and Linux all have their own style of controls and that’s fine, it is possible to get the same functionality out of each of them even though they look different.
I’m talking about Mac ARM64 only being to display half the toolbar buttons of other OS so the loss of functionality means I cannot use it in the same way as with other platforms.
For example - I cannot assign dynamic text to the titlebar such as the user’s path to a database, because I have no idea how much space the text will take up and how many toolbar buttons may be hidden to display it.
Can you think of another OS control that behaves in such a different way?

To simplify matters, I’ve made a wee demo project.

Simply add the OWToolbar object to your project, set your toolbar’s super to be OWToolbar. Then for each window select the toolbar (on the window) and choose the style from the style menu.

These match the styles on this page

All the needed declares are included in this project. I hope this helps clear this up. If you want to use these styles on your Intel apps, the guide is here


1 Like
Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.