mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
LibGUI+WindowServer: Make it possible to have checkable GActions.
They show up as checkable GButtons in GToolBar, and with (or without) check marks in menus. There are a bunch of places to make use of this. This patch only takes advantage of it in the FileManager for the view type actions.
This commit is contained in:
@@ -133,6 +133,9 @@ void GButton::set_action(GAction& action)
|
||||
m_action = action.make_weak_ptr();
|
||||
action.register_button({ }, *this);
|
||||
set_enabled(action.is_enabled());
|
||||
set_checkable(action.is_checkable());
|
||||
if (action.is_checkable())
|
||||
set_checked(action.is_checked());
|
||||
}
|
||||
|
||||
void GButton::set_icon(RetainPtr<GraphicsBitmap>&& icon)
|
||||
|
||||
Reference in New Issue
Block a user