Skip to content

CheckIndicator: Allow exclusive buttons to be detected via their ButtonGroup

ivan tkachenko requested to merge work/ratijas/exclusive-menu into master

This is a bit wasteful, as it creates a ButtonGroup attached object for every menu item that does not have it. But it works. Unfortunately, there is no better approach, as if ButtonGroup is bound to an item later than this binding is established, we won't know about it.

All components using CheckIndicator, except MenuItem, were modified to override this new more advanced heuristic with a fixed elementType, so they don't waste memory on attached objects, and always have predictable appearance.

See also: kirigami!1014 (merged)

BUG: 467390


Fixes, for example, this "repeat mode" menu in Elisa:

image

and hundreds of other places.

Edited by ivan tkachenko

Merge request reports

Loading