PythonScript icon indicating copy to clipboard operation
PythonScript copied to clipboard

Buttons not added when Small/Big icons option is set

Open eugenesvk opened this issue 5 years ago • 4 comments

Custom toolbar icons are not visible in Notepad++ (using v7.8.4 x64) when Settings>Preferences>Toolbar is set to either Small icons or Big icons

eugenesvk avatar Feb 02 '20 19:02 eugenesvk

It's true, but it isn't only the Pythonscript toolbar buttons; other plugins don't get their buttons shown either, not sure which ones (or maybe all?) but for sure MarkdownViewer and NppExec (because those are the ones I use) that have toolbar buttons when "Standard" is selected, and they disappear if "Large" or "Small" is selected.

Thus, not sure if it is a Pythonscript issue or a general Notepad++ issue, or both?

sasumner avatar Feb 02 '20 20:02 sasumner

Initially I thought it might be because only standard-sized icons are provided by this plugin, but I don't really know how toolbars work in NPP, so maybe it's indeed a general issue

eugenesvk avatar Feb 02 '20 20:02 eugenesvk

From a first look it seems there is no notification from N++ that the icon set size has changed and appropriate ones should be provided by the plugins, see https://npp-user-manual.org/docs/plugin-communication/#nppm-addtoolbaricon and https://npp-user-manual.org/docs/plugin-communication/#nppn-tbmodification and corresponding code around: https://github.com/notepad-plus-plus/notepad-plus-plus/blob/ade01204c8800c6117bdc72eb476de4226adf4fa/PowerEditor/src/WinControls/ToolBar/ToolBar.cpp#L346

chcg avatar Jul 16 '20 11:07 chcg