1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-19 00:25:07 +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:
Andreas Kling 2019-08-12 18:48:50 +02:00
parent af6483cabb
commit 7e93418927
2 changed files with 3 additions and 3 deletions

View file

@ -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();