Smaller toolbar icons

I’m starting to make the wonderful black-and-white icons for macOS BS.


theNSWindow.toolbarStyle = NSWindowMBS.NSWindowToolbarStylePreference

I can make the toolbar icons for the Preferences window smaller:

With the unified style

theNSWindow.toolbarStyle = NSWindowMBS.NSWindowToolbarStyleUnified

I get large icons:

How do I make the tiny icons like Mail has?

Try to set the first icon to the wanted size ?

I’ve made some PDFs, loaded those into Xojo and then changed the toolbar:

dim nt as NSToolbarMBS = self.Window.NSToolbarMBS
dim items() as NSToolbarItemMBS = nt.items

for each item as NSToolbarItemMBS in items
  if item.label = ToolbarLocalization.kPrint then
    dim theImage as new NSImageMBS(printer_outline)
    theImage.isTemplate = true
    theImage.setSize(24, 24)
    item.image = theImage
  ElseIf item.label = ToolbarLocalization.kSetup then
    dim theImage as new NSImageMBS(gear_outline)
    theImage.isTemplate = true
    item.image = theImage
  end if

I added the SetSize for testing. But this didn’t change anything. Or is this like for the squircle where I need to make large margins?

Set the icon on a button and set the button as the view on the NSToolbarItem. At least that is what I did for App Wrapper.

The NSToolbar also has options for choosing a smaller size.

1 Like

Okay, I need to dig through the examples for the toolbar in the MBS plugin again.

I’ve tried out all values for the toolbar style. But I didn’t get smaller icons:

Thats the new Big Sur option, which is set onto the window. If you take a look at the NSToolbar classes, there are options for customizing the toolbar.

I have no idea why they decided to place the new toolbar option on the window rather than the toolbar, with all the others. It creates confusion.

I’m either going to use what is in the MBS plugin or I’m going to bother Christian.

But but but the design is clean.

I’m going to fake the icons:

I had a 64x64 icon which I changed to 96x96 without increasing the size of the icon. For now this looks good enough.

Just a smaller image? Icons taken from SF Symbols and turned into images using Mac app Graphic, great batch export of individual layers.

Screenshot 2021-08-10 at 19.52.11