mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:37:46 +00:00
LibGUI: Notify widgets when their enabled state changes.
This is done by dispatching a (synchronous) "EnabledChange" event that can be picked up in change_event(). Use this event to kick widgets out of their "being pressed"-type modes if the user is interacting with them while the state is programmatically changed.
This commit is contained in:
parent
e478a2fb0a
commit
d12857fc36
9 changed files with 44 additions and 0 deletions
|
@ -42,6 +42,7 @@ private:
|
|||
virtual void mouseup_event(GMouseEvent&) override;
|
||||
virtual void mousemove_event(GMouseEvent&) override;
|
||||
virtual void leave_event(CEvent&) override;
|
||||
virtual void change_event(GEvent&) override;
|
||||
|
||||
int button_size() const { return 16; }
|
||||
int button_width() const { return orientation() == Orientation::Vertical ? width() : button_size(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue