]> Nutra Git (v1) - gamesguru/feather.git/commitdiff
depends: qt: fix alternating row icons on windows
authortobtoht <tob@featherwallet.org>
Sun, 22 Oct 2023 17:19:11 +0000 (19:19 +0200)
committertobtoht <tob@featherwallet.org>
Sun, 22 Oct 2023 17:37:58 +0000 (19:37 +0200)
Thanks to Lyza for reporting this issue

contrib/depends/packages/qt.mk
contrib/depends/patches/qt/fix_alternating_row_icons_windows.patch [new file with mode: 0644]

index d53c422d0ad8515bd86bd447e6f33e47d8f46f08..b1f3191b28e5da48c0357fddc8997d6e4ee086eb 100644 (file)
@@ -21,6 +21,7 @@ $(package)_patches += libxau-fix.patch
 $(package)_patches += toolchain.cmake
 $(package)_patches += xkb-1.6.0.patch
 $(package)_patches += CVE-2023-45872-qtsvg-6.6.0.diff
+$(package)_patches += fix_alternating_row_icons_windows.patch
 #$(package)_patches += fix-static-fontconfig-static-linking.patch
 
 $(package)_qttools_file_name=qttools-$($(package)_suffix)
@@ -190,6 +191,7 @@ define $(package)_preprocess_cmds
   patch -p1 -i $($(package)_patch_dir)/xcb-util-image-fix.patch && \
   patch -p1 -i $($(package)_patch_dir)/libxau-fix.patch && \
   patch -p1 -i $($(package)_patch_dir)/xkb-1.6.0.patch && \
+  patch -p1 -i $($(package)_patch_dir)/fix_alternating_row_icons_windows.patch && \
   cd ../qtmultimedia && \
   patch -p1 -i $($(package)_patch_dir)/qtmultimedia-fixes.patch && \
   patch -p1 -i $($(package)_patch_dir)/v4l2.patch && \
diff --git a/contrib/depends/patches/qt/fix_alternating_row_icons_windows.patch b/contrib/depends/patches/qt/fix_alternating_row_icons_windows.patch
new file mode 100644 (file)
index 0000000..19c66b9
--- /dev/null
@@ -0,0 +1,30 @@
+From 8cf8182967af4c7d69deb9b583eb19aaa1b9f9b0 Mon Sep 17 00:00:00 2001
+From: tobtoht <tob@featherwallet.org>
+Date: Sun, 22 Oct 2023 19:03:27 +0200
+Subject: [PATCH] Revert "Don't double draw ItemViewItems' icons in
+ QStyleSheetStyle::drawControl"
+
+This reverts commit e2e0c07455e5e6c8f65dc76a86a63b93dadb7600.
+---
+ src/widgets/styles/qstylesheetstyle.cpp | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
+index e9443ac9c8..e81381681d 100644
+--- a/src/widgets/styles/qstylesheetstyle.cpp
++++ b/src/widgets/styles/qstylesheetstyle.cpp
+@@ -4374,11 +4374,6 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q
+                     optIndicator.backgroundBrush = Qt::NoBrush; // no background
+                     optIndicator.text.clear();
+                     QWindowsStyle::drawControl(ce, &optIndicator, p, w);
+-
+-                    // If the indicator has an icon, it has been drawn now.
+-                    // => don't draw it again.
+-                    optCopy.icon = QIcon();
+-
+                     // Now draw text, background, and highlight, but not the indicator  with the
+                     // base style. Since we can't turn off HasCheckIndicator to prevent the base
+                     // style from drawing the check indicator again (it would change how the item
+-- 
+2.42.0
+