1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-26 01:45:06 +00:00

WindowServer: Add action icons to the window menus

This commit is contained in:
Andreas Kling 2020-04-30 12:58:38 +02:00
parent 6c0fed3866
commit 23d99e92b9
8 changed files with 60 additions and 5 deletions

View file

@ -85,4 +85,12 @@ Gfx::Rect MenuItem::rect() const
return m_rect.translated(0, m_menu.item_height() - (m_menu.scroll_offset() * m_menu.item_height()));
}
void MenuItem::set_icon(const Gfx::Bitmap* icon)
{
if (m_icon == icon)
return;
m_icon = icon;
m_menu.redraw();
}
}