Customize space between items in a NSToolbar

354 Views Asked by At

In my MacOS app I have a NSToolbar with some toolbar items (NSToolbarItem) inside. I've been trying to change the space between the items by subclassing both NSToolbar and NSToolbarItem, but without success. Is there a way to customize this space?

1

There are 1 best solutions below

0
Vinicius Bazanella On BEST ANSWER

To solve this i ended up inserting all the views of each toolbar item into a stack, so I could control the space between them with the spacing property of NSStackView. Then my toolbar has only the stack as a ToolbarItem.