NSToolbar can have two sizes controlled by the user using "Use Small Size" menu item. Regular toolbar size requires 32x32 icon sizes for each item while small size uses 24x24. I don't want icons to scale by default since i have a pair of icons for each toolbar size. Instead i want icons to automatically switch to the other size when user changes toolbar size.
Now IB only has a single image field for each toolbar item. Is there a way to automatically change icon size or do i have to subclass NSToolbar and react to size changes manually and fix the icons for each item?
From the Apple Guide for toolbars:
You should provide image representations specific to the default, regular and small size modes in a single image that supports multiple image representations such as icns or tiff. The appropriate image representation is automatically displayed for the toolbar's current sizeMode. If an appropriate representation is not available, the toolbar scales the a representation to the appropriate size for the current mode, at a cost in performance and appearance.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With