1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 10:57:34 +00:00

LibGUI+WindowServer: Add menu minimum width support

This commit is contained in:
Bastiaan van der Plaat 2024-01-25 18:57:37 +01:00 committed by Andrew Kaster
parent adc845e0cb
commit 350affe406
8 changed files with 56 additions and 10 deletions

View file

@ -36,6 +36,9 @@ public:
String const& name() const { return m_name; }
void set_name(String);
int minimum_width() const { return m_minimum_width; }
void set_minimum_width(int);
Gfx::Bitmap const* icon() const { return m_icon.ptr(); }
void set_icon(Gfx::Bitmap const*);
@ -81,6 +84,7 @@ private:
int m_menu_id { -1 };
String m_name;
int m_minimum_width { 0 };
RefPtr<Gfx::Bitmap const> m_icon;
Vector<NonnullOwnPtr<MenuItem>> m_items;
WeakPtr<Action> m_current_default_action;