From: Debian Qt/KDE Maintainers Date: Sat, 3 Dec 2022 17:38:46 +0000 (+0000) Subject: QPushButton/fusion style: don't ignore QIcon::On icon X-Git-Tag: archive/raspbian/5.15.6+dfsg-5+rpi1^2~24 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=ddc8b3b938e1f07f302bdd8bea10a210f7da6990;p=qtbase-opensource-src.git QPushButton/fusion style: don't ignore QIcon::On icon Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=e9ccdf4d84157173 Last-Update: 2021-08-10 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. Gbp-Pq: Name fusion_checkable_qpushbutton.diff --- diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp index f4345d97c..962912c83 100644 --- a/src/widgets/styles/qfusionstyle.cpp +++ b/src/widgets/styles/qfusionstyle.cpp @@ -1772,14 +1772,6 @@ void QFusionStyle::drawControl(ControlElement element, const QStyleOption *optio proxy()->drawControl(CE_PushButtonLabel, &subopt, painter, widget); } break; - case CE_PushButtonLabel: - if (const QStyleOptionButton *button = qstyleoption_cast(option)) { - QStyleOptionButton b(*button); - // no PM_ButtonShiftHorizontal and PM_ButtonShiftVertical for fusion style - b.state &= ~(State_On | State_Sunken); - QCommonStyle::drawControl(element, &b, painter, widget); - } - break; case CE_MenuBarEmptyArea: painter->save(); {