Sophie

Sophie

distrib > Mageia > cauldron > x86_64 > media > core-release-src > by-pkgid > 4c532bfb9916518564da5ba2805999f5 > files > 38

qtbase5-5.15.12-3.mga10.src.rpm

From 6ef26a5b3c70c733d9f4f6f7b0ee4b2706f15a39 Mon Sep 17 00:00:00 2001
From: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Date: Mon, 21 Dec 2020 14:16:57 +0100
Subject: [PATCH 038/147] QPushButton/fusion style: don't ignore QIcon::On icon

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 e9ccdf4d8415717323ea7849ded195343560514a)
---
 src/widgets/styles/qfusionstyle.cpp | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/src/widgets/styles/qfusionstyle.cpp b/src/widgets/styles/qfusionstyle.cpp
index a225d4b563..35e2769ac4 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<const QStyleOptionButton *>(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();
     {
-- 
2.40.1