mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 06:48:49 +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:
parent
9ff36afeaa
commit
8f81a3f9dd
Notes:
sideshowbarker
2024-07-19 14:34:35 +09:00
Author: https://github.com/awesomekling
Commit: 8f81a3f9dd
15 changed files with 148 additions and 20 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue