Skip to content

MenuDialog: Redo delegate, improve typing

ivan tkachenko requested to merge work/ratijas/whats-for-dinner into master

Since this top-level component exists solely for its internals, we assume that the column and header are not replaceable, hence we can rely on IDs and use more robust alias property for header's content item.

In delegate, almost every binding has changed. Most properties are now automagically bound through AbstractButton::action. Marking context property as required allows getting rid in context injection and add explicit typing. Setting padding in this new way saves one binding expression, thus should evaluate faster with native C++ padding fallback chain. ToolTip now uses built-in pressed/hovered properties of the list item itself rather than stacking an extra HoverHandler on top (and not accounting for tablet mode, apparently).


Key navigation is still to be done. I legit didn't consciously knew about this component until now, even though I did some formatting/refactoring edits to it in past. It has also led me to discover that tooltip's binding is wrong in BasicListItem; what a surprise. The only use of this component that I could find outside of Kirigami Gallery is in Elisa.

Merge request reports