Update the button state when the tool is toggled. Also use NSToggleButton for
this tool and not NSOnOffButton as the latter doesn't use the alternative
(toggled) image.
Closes #12408.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66042
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
else
[m_toolbarItem setImage:m_bmpNormal.GetNSImage()];
}
+ else
#endif
+ {
+ [(NSButton*)m_controlHandle setState:(toggle ? NSOnState : NSOffState)];
+ }
}
wxToolBarTool::wxToolBarTool(
[v setBezelStyle:NSRegularSquareBezelStyle];
[v setBordered:NO];
- [v setButtonType: ( tool->CanBeToggled() ? NSOnOffButton : NSMomentaryPushInButton )];
+ [v setButtonType: ( tool->CanBeToggled() ? NSToggleButton : NSMomentaryPushInButton )];
[v setImplementation:tool];
controlHandle = v;