From 0c204c3ebb6c150794b2c9c6ca9ebeca7abc93f5 Mon Sep 17 00:00:00 2001 From: TheLastRar Date: Wed, 23 Oct 2024 17:12:41 +0100 Subject: [PATCH] Qt: Hackfix settings icon stretching on Windows themes --- .../scripts/windows/build-dependencies.bat | 3 +++ .../scripts/windows/qtbase-fix-icon-stretch.patch | 13 +++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 .github/workflows/scripts/windows/qtbase-fix-icon-stretch.patch diff --git a/.github/workflows/scripts/windows/build-dependencies.bat b/.github/workflows/scripts/windows/build-dependencies.bat index dc183ef9b7..b3f45ecab1 100644 --- a/.github/workflows/scripts/windows/build-dependencies.bat +++ b/.github/workflows/scripts/windows/build-dependencies.bat @@ -195,6 +195,9 @@ cd "qtbase-everywhere-src-%QT%" || goto error rem Disable the PCRE2 JIT, it doesn't properly verify AVX2 support. %PATCH% -p1 < "%SCRIPTDIR%\qtbase-disable-pcre2-jit.patch" || goto error +rem Hackfix settings icon stretching +%PATCH% -p1 < "%SCRIPTDIR%\qtbase-fix-icon-stretch.patch" || goto error + cmake -B build -DFEATURE_sql=OFF -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" %FORCEPDB% -DINPUT_gui=yes -DINPUT_widgets=yes -DINPUT_ssl=yes -DINPUT_openssl=no -DINPUT_schannel=yes -DFEATURE_system_png=ON -DFEATURE_system_jpeg=ON -DFEATURE_system_zlib=ON -DFEATURE_system_freetype=ON -DFEATURE_system_harfbuzz=ON %QTBUILDSPEC% || goto error cmake --build build --parallel || goto error ninja -C build install || goto error diff --git a/.github/workflows/scripts/windows/qtbase-fix-icon-stretch.patch b/.github/workflows/scripts/windows/qtbase-fix-icon-stretch.patch new file mode 100644 index 0000000000..022d8409d3 --- /dev/null +++ b/.github/workflows/scripts/windows/qtbase-fix-icon-stretch.patch @@ -0,0 +1,13 @@ +diff --git a/src/plugins/styles/modernwindows/qwindowsvistastyle.cpp b/src/plugins/styles/modernwindows/qwindowsvistastyle.cpp +index 208420d7e8..26ef6f31ef 100644 +--- a/src/plugins/styles/modernwindows/qwindowsvistastyle.cpp ++++ b/src/plugins/styles/modernwindows/qwindowsvistastyle.cpp +@@ -4232,8 +4232,6 @@ QRect QWindowsVistaStyle::subElementRect(SubElement element, const QStyleOption + + case SE_ItemViewItemDecoration: + rect = QWindowsStyle::subElementRect(element, option, widget); +- if (qstyleoption_cast(option)) +- rect.adjust(-2, 0, 2, 0); + break; + + case SE_ItemViewItemFocusRect: