Skip to content

GridDelegate: Fix ring color for disabled items

Ismael Asensio requested to merge work/iasensio/griddelegate-disabled-ring into master

Stop showing a coloured ring for the hovered items when
they are disabled.

Sorry I didn't catch this also on the other MR. The rings still react to mouse hover even when the whole view is disabled, which feels a bit disconcerting.

The current selected item still shows a ring becase, but just
with the regular highlight color, because the neutral highlight
doesn't get get desaturated when hovered.

While at it, simplify the cascading conditions logic and use
the newer `Qt.alpha()` function.

BEFORE AFTER
griddelegate_disabled_labels.png griddelegate_disabled_rings.png

While at it, on a second commit, made a small refactor of the cascading conditions, and use the newer Qt.alpha()

Edited by Ismael Asensio

Merge request reports