A few weeks ago I made an update to the Truss and Wall plugins to try and fix a long standing macOS issue with my toolbars, more specifically with the way the tooltips were displayed.
After some testing by certain power users it was found that when the toolbars are oriented vertically as shown below the tooltip does show but the icon does not “darken” or “depress” as it does in Windows.
Am I doing something wrong here or is this a known issue with macOS. This question is mostly directly at other developers and to the SketchUp gurus who are a pay grade above me.
This is what ChatGPT responded with in answer to my question:
You’re not doing anything “wrong” in that snippet — you’ve run into a long-standing SketchUp-for-macOS toolbar/palette bug/limitation, not a Ruby API usage issue.
What’s going on (macOS)
On macOS, extension toolbars are those floating Tool Palettes. There’s a known issue where:
Switching orientation often requires a SketchUp restart before tooltips behave again. SketchUp Community+1
Related: “hover/press feedback” and command appearance updates are also inconsistent for plugin palettes on macOS (validation/state/visual response not updating as expected). GitHub+1
SketchUp’s own API issue tracker has this logged as an API/UI bug affecting tooltips, status bar text, and command appearance for plugin toolbars (palettes) on macOS. GitHub
Why your icon doesn’t “darken/depress” like Windows
Windows and macOS are using different native UI implementations for these toolbars/palettes. On macOS, extension palettes have multiple documented UI behavior gaps (including the “pressed/highlight” and command-state rendering). GitHub+1
If what you really want is a “toggled/checked” look (not just a momentary press effect), the intended API mechanism is a validation proc:
If they change orientation, quit + relaunch SketchUp to get tooltips back. SketchUp Community+1
If you want better “remembered” palette behavior, prefer toolbar.restore over toolbar.show (more about visibility/positioning than tooltips, but it’s the recommended pattern on Mac). SketchUp Community
Encourage power users to place a few critical commands in the main (top) toolbar via Customize Toolbar, since the worst behavior tends to be with separate extension palettes. GitHub
Bottom line: your command setup is fine; the tooltip + visual feedback problems you’re seeing match a known macOS palette issue in SketchUp.
… except the AI is incorrect (as it often is) with regard to the return value.
Here the AI is confoundingSketchup::Menu#add_item with UI::Toolbar#add_item.
It is the former that returns an Integer ID.
… comes from a poor example in the SketchUp Ruby API documentation.
It really makes no good sense to assign the toolbar reference to the return value of toolbar.add_item because the code must have already assigned a UI::Toolbar object to the toolbar reference (likely via use of the class constructor.)