More control over Toolbar icons in macOS

While I appear to have control over the Toolbar ToolButton’s icon size on Windows, they are fixed at 32x32 on macOS, it seems to me.

And I also cannot get rid of the text below the icons, or can I?

I then also tried the NSWindow option to hide the window title, which automagically moves the toolbar into the title area, like one can see in Safari, for instance.

The command via MBS, in the Window.Open event: self.NSWindowMBS.titleVisibility = NSWindowMBS.NSWindowTitleHidden

I tried that with my new app, and this is how it then looks. Before:

After:

Surprisingly, this removes the icon titles!

So I wonder if I can do more things via the Cocoa API, such as reducing the icon size as well. Does anyone know?

searching the Forum has revealed this: https://forum.xojo.com/conversation/post/274427

Thanks for finding that. I had googled the forum quickly but didn’t see this one.

That forum thread fulfills all my needs :slight_smile:

[quote=356546:@Thomas Tempelmann]While I appear to have control over the Toolbar ToolButton’s icon size on Windows, they are fixed at 32x32 on macOS, it seems to me.

And I also cannot get rid of the text below the icons, or can I?
[/quote]

how do i remove the text under the button on Windows??

Richard, it seems to me that on Windows the toolbar is not handled by the native framework (like Cocoa on macOS) but is all drawn and handled by Xojo’s own code. Meaning it’s just something you could as well do on your own, and that’s what https://graffitisuite.com seems to do, in fact (someone correct me if I’m wrong).

BTW, I ended up using MBS’s excellent plugin because I wanted also the fancy button looks on macOS, and that would’ve taken me too long with declares. MBS also comes with an example project that shows all its possibilities, called “Toolbar buttons.rbp”.


(Yes, the icons still need to be redone)

I manage to remove the text under icon by Caption of the toolbar button to “” on both and macosx and windows but the space is still there

If you have the Retina Kit, the functions for this are in the InterfaceKit module. I have a demo application on the site http://ohanaware.com/retinakit/

Toolbars are all native on each platform