diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-08-26 18:54:44 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-08-26 18:54:44 +0200 |
commit | 1e604b7984290694cefefc3ccf70be86c44395ba (patch) | |
tree | f4af2fc7e98906395dd6c633bd3aef1d019dadce /Libraries/LibGUI/GAction.h | |
parent | d522a6fe4c6dae3d36ca7f77c957be7073b27d9c (diff) | |
download | serenity-1e604b7984290694cefefc3ccf70be86c44395ba.zip |
WindowServer+LibGUI: Show action icons in the menus when possible
Any GAction that has an icon assigned will now show up with that icon
when added to a menu as well.
I made the menu items 2px taller to accomodate the icons. I think this
turned out quite nice as well :^)
Diffstat (limited to 'Libraries/LibGUI/GAction.h')
-rw-r--r-- | Libraries/LibGUI/GAction.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Libraries/LibGUI/GAction.h b/Libraries/LibGUI/GAction.h index eedb597d61..c294d65de9 100644 --- a/Libraries/LibGUI/GAction.h +++ b/Libraries/LibGUI/GAction.h @@ -48,6 +48,7 @@ public: String text() const { return m_text; } GShortcut shortcut() const { return m_shortcut; } const GraphicsBitmap* icon() const { return m_icon.ptr(); } + void set_icon(const GraphicsBitmap* icon) { m_icon = icon; } Function<void(GAction&)> on_activation; |