Plugins don't show small tool bar icons

Got a complaint from a user that my plugin “doesn’t work” with the ‘use small tool bar icons’ option.

Created a new basic plugin with the wizard in 4.17, which indeed showed no icon in the toolbar.

1 Like

After a lot of code diving and experimenting, the solution is to edit your plugin’s Style.cpp and add the following to the style Create function:

Style->Set("[your plugin name here].OpenPluginWindow.Small", new IMAGE_BRUSH(TEXT("ButtonIcon_40x"), Icon20x20));

or

Style->Set("[your plugin name here].PluginAction.Small", new IMAGE_BRUSH(TEXT("ButtonIcon_40x"), Icon20x20));

Maybe add this to the wizard template?

1 Like

Thank you so much! I have been pulling my hairs on this one for a whole day!!