mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-12 14:12:52 +00:00
GWidget: Add "enabled" state for widgets.
There's nothing magical that happens for painting, each widget needs to handle it manually in their painting code.
This commit is contained in:
parent
a1015840ff
commit
269886fc4e
Notes:
sideshowbarker
2024-07-19 14:44:35 +09:00
Author: https://github.com/awesomekling
Commit: 269886fc4e
2 changed files with 12 additions and 0 deletions
|
@ -408,3 +408,11 @@ bool GWidget::spans_entire_window_horizontally() const
|
|||
auto wrr = window_relative_rect();
|
||||
return wrr.left() == main_widget->rect().left() && wrr.right() == main_widget->rect().right();
|
||||
}
|
||||
|
||||
void GWidget::set_enabled(bool enabled)
|
||||
{
|
||||
if (m_enabled == enabled)
|
||||
return;
|
||||
m_enabled = enabled;
|
||||
update();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue