Skip to content

[Debian pick] QPushButton/fusion style: don't ignore QIcon::On icon

So for some reason I ended up in Debian's patch tracker for Qt. Turns out they have this commit in their patchset, not marked for backport to 5.15 by Qt upstream, but the problem and fix was reproduced by a fellow Gentoo user.

See also: https://lists.debian.org/debian-qt-kde/2021/08/msg00035.html e9ccdf4d

The fusion style did ignore the QIcon::On icon because it reset State_On to avoid the visual shift of a pressed button. But it's not needed to reset this flag - the shift does not happen because the fusion style does return 0 as offset for PM_ButtonShiftHorizontal/PM_ButtonShiftVertical so no shifting will happen.

Fixes: QTBUG-86736 Fixes: QTBUG-82110 Change-Id: Ie2aaddb14bc67874f5a9a23d9f04d7a08c6d070f Reviewed-by: Cristian Maureira-Fredes cristian.maureira-fredes@qt.io Reviewed-by: Richard Moe Gustavsen richard.gustavsen@qt.io (cherry picked from commit e9ccdf4d)

Edited by Andreas Sturmlechner

Merge request reports