mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-03 06:40:05 +00:00
LibGUI+TextEditor: Make GButton activate its action if present
Previously even if you assigned a GAction to a GButton, you still had to activate() the action manually by hooking the GButton::on_click callback.
This commit is contained in:
parent
ded005500d
commit
e8e8741c88
Notes:
sideshowbarker
2024-07-19 12:31:32 +09:00
Author: https://github.com/awesomekling
Commit: e8e8741c88
3 changed files with 2 additions and 9 deletions
|
@ -68,6 +68,8 @@ void GButton::click()
|
|||
}
|
||||
if (on_click)
|
||||
on_click(*this);
|
||||
if (m_action)
|
||||
m_action->activate();
|
||||
}
|
||||
|
||||
bool GButton::supports_keyboard_activation() const
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue