mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 03:09:08 +00:00
GButton: Allow non-checkable buttons to render as checked
This changes the behavior of the "is_checkable" flag on GAbstractButton to only be about user interaction checkability. In other words, it now only prevents the user from checking/unchecking the button, the code.
This commit is contained in:
@@ -35,7 +35,7 @@ void GAbstractButton::set_checked(bool checked)
|
||||
|
||||
if (is_exclusive() && checked) {
|
||||
parent_widget()->for_each_child_of_type<GAbstractButton>([&](auto& sibling) {
|
||||
if (!sibling.is_exclusive() || !sibling.is_checkable() || !sibling.is_checked())
|
||||
if (!sibling.is_exclusive() || !sibling.is_checked())
|
||||
return IterationDecision::Continue;
|
||||
sibling.m_checked = false;
|
||||
sibling.update();
|
||||
|
||||
Reference in New Issue
Block a user