From 91f68113d249b71dce2b37eaaa79027fc7cd660e Mon Sep 17 00:00:00 2001 From: tobtoht Date: Sun, 22 Oct 2023 19:19:11 +0200 Subject: [PATCH] depends: qt: fix alternating row icons on windows Thanks to Lyza for reporting this issue --- contrib/depends/packages/qt.mk | 2 ++ .../fix_alternating_row_icons_windows.patch | 30 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 contrib/depends/patches/qt/fix_alternating_row_icons_windows.patch diff --git a/contrib/depends/packages/qt.mk b/contrib/depends/packages/qt.mk index d53c422..b1f3191 100644 --- a/contrib/depends/packages/qt.mk +++ b/contrib/depends/packages/qt.mk @@ -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 index 0000000..19c66b9 --- /dev/null +++ b/contrib/depends/patches/qt/fix_alternating_row_icons_windows.patch @@ -0,0 +1,30 @@ +From 8cf8182967af4c7d69deb9b583eb19aaa1b9f9b0 Mon Sep 17 00:00:00 2001 +From: tobtoht +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 +