LibGUI: Allow overriding the button size when constructing GToolBar

This makes it easy to create a toolbar housing buttons of a size other
than 16x16.
This commit is contained in:
Andreas Kling 2019-11-08 21:18:46 +01:00
commit d22d9874f7
Notes: sideshowbarker 2024-07-19 11:19:20 +09:00
2 changed files with 8 additions and 6 deletions

View file

@ -18,7 +18,7 @@ public:
protected:
explicit GToolBar(GWidget* parent);
explicit GToolBar(Orientation, GWidget* parent);
explicit GToolBar(Orientation, int button_size, GWidget* parent);
virtual void paint_event(GPaintEvent&) override;
@ -33,5 +33,6 @@ private:
RefPtr<GAction> action;
};
NonnullOwnPtrVector<Item> m_items;
int m_button_size { 16 };
bool m_has_frame { true };
};