[neon/qt/qtbase/Neon/release] debian: Backport upstream patch to fix icon display on checkable QPushButtons.

Dmitry Shachnev null at kde.org
Thu May 5 10:59:24 BST 2022


Git commit c6e085b698ee918a21126c049ba5878389389dcd by Dmitry Shachnev.
Committed on 10/08/2021 at 12:03.
Pushed by jriddell into branch 'Neon/release'.

Backport upstream patch to fix icon display on checkable QPushButtons.

Closes: #991255.

M  +4    -0    debian/changelog
A  +27   -0    debian/patches/fusion_checkable_qpushbutton.diff
M  +1    -0    debian/patches/series

https://invent.kde.org/neon/qt/qtbase/commit/c6e085b698ee918a21126c049ba5878389389dcd

diff --git a/debian/changelog b/debian/changelog
index 55050ad..8ba46a3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,10 @@ qtbase-opensource-src (5.15.2+dfsg-10) UNRELEASED; urgency=medium
   * Backport upstream patch to fix the regression with placement of
     placeholder text in QLineEdits with action icons.
 
+  [ Dmitry Shachnev ]
+  * Backport upstream patch to fix icon display on checkable QPushButtons
+    with Fusion style (closes: #991255).
+
  -- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org>  Tue, 10 Aug 2021 14:22:02 +0300
 
 qtbase-opensource-src (5.15.2+dfsg-9) unstable; urgency=medium
diff --git a/debian/patches/fusion_checkable_qpushbutton.diff b/debian/patches/fusion_checkable_qpushbutton.diff
new file mode 100644
index 0000000..ae284f4
--- /dev/null
+++ b/debian/patches/fusion_checkable_qpushbutton.diff
@@ -0,0 +1,27 @@
+Description: 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.
+Origin: upstream, https://code.qt.io/cgit/qt/qtbase.git/commit/?id=e9ccdf4d84157173
+Last-Update: 2021-08-10
+
+--- a/src/widgets/styles/qfusionstyle.cpp
++++ b/src/widgets/styles/qfusionstyle.cpp
+@@ -1771,14 +1771,6 @@ void QFusionStyle::drawControl(ControlEl
+             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();
+     {
diff --git a/debian/patches/series b/debian/patches/series
index 60097f5..2277fb7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,6 +7,7 @@ mime_globs.diff
 fix-invalid-pointer-return-with-QGridLayout.diff
 fix-misplacement-of-placeholder-text-in-QLineEdit.diff
 fix-placement-of-placeholder-text-in-QLineEdits-with-action-icons.diff
+fusion_checkable_qpushbutton.diff
 
 # Debian specific.
 gnukfreebsd.diff



More information about the Neon-commits mailing list