Not signed in (Sign In)

Vanilla 1.1.4 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorkcesyr
    • CommentTimeJan 25th 2018 edited
     
    I wonder how to set an icon (path to icon png file) for a custom plugin.
    Action:Class exposes an icon= method accepting an file path, thus, an icon can be shown in menus.

    So far, I have not figured out, how to attach an icon to a plugin, so that it appears in the @toolbar menu.
    • CommentAuthorlukasc
    • CommentTimeJan 26th 2018
     

    Here is an example where a png icon is added to the tool bar:

    https://github.com/lukasc-ubc/SiEPIC-Tools/blob/master/klayout_dot_config/python/SiEPIC/setup.py

    • CommentAuthorkcesyr
    • CommentTimeJan 26th 2018 edited
     
    Thank you very much for the hint. I have not noticed the Menu:Class method action.
    The simple solution, thus, is

    Application::instance.main_window.menu.action(<menu-path>).icon = <icon_file-path>