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 :^)
This commit is contained in:
Andreas Kling 2019-08-26 18:54:44 +02:00
commit 1e604b7984
Notes: sideshowbarker 2024-07-19 12:30:28 +09:00
11 changed files with 61 additions and 11 deletions

View file

@ -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;