mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-13 18:04:32 +00:00
Deps: Patch Qt fusion style
Stop the checkboxes having such bright outlines, it looks terrible.
This commit is contained in:
@@ -396,6 +396,7 @@ if [ "$SKIP_QT" != true ]; then
|
||||
rm -fr "qtbase-everywhere-src-$QT"
|
||||
tar xf "qtbase-everywhere-src-$QT.tar.xz"
|
||||
cd "qtbase-everywhere-src-$QT"
|
||||
patch -p1 < "$SCRIPTDIR/qtbase-fusion-style.patch"
|
||||
mkdir build
|
||||
cd build
|
||||
../configure -prefix "$INSTALLDIR" -extprefix "$INSTALLDIR" -qt-host-path "$HOSTDIR" -release -dbus runtime -fontconfig -qt-doubleconversion -ssl -openssl-runtime -opengl desktop -qpa xcb,wayland -xkbcommon -xcb -gtk -- -DCMAKE_TOOLCHAIN_FILE="$TOOLCHAINFILE" -DQT_GENERATE_SBOM=OFF -DFEATURE_cups=OFF -DFEATURE_dbus=ON -DFEATURE_dbus_linked=OFF -DFEATURE_icu=OFF -DFEATURE_sql=OFF -DFEATURE_system_png=ON -DFEATURE_system_jpeg=ON -DFEATURE_system_zlib=ON -DFEATURE_system_freetype=ON -DFEATURE_system_harfbuzz=ON
|
||||
|
||||
@@ -331,6 +331,7 @@ if [ "$SKIP_QT" != true ]; then
|
||||
tar xf "qtbase-everywhere-src-$QT.tar.xz"
|
||||
cd "qtbase-everywhere-src-$QT"
|
||||
patch -p1 < "$SCRIPTDIR/qtbase-disable-pcre2-jit.patch"
|
||||
patch -p1 < "$SCRIPTDIR/qtbase-fusion-style.patch"
|
||||
mkdir build
|
||||
cd build
|
||||
../configure -prefix "$INSTALLDIR" -release -dbus-linked -fontconfig -qt-doubleconversion -ssl -openssl-runtime -opengl desktop -qpa xcb,wayland -xkbcommon -xcb -gtk -- -DQT_GENERATE_SBOM=OFF -DFEATURE_cups=OFF -DFEATURE_dbus=ON -DFEATURE_icu=OFF -DFEATURE_sql=OFF -DFEATURE_system_png=ON -DFEATURE_system_jpeg=ON -DFEATURE_system_zlib=ON -DFEATURE_system_freetype=ON -DFEATURE_system_harfbuzz=ON
|
||||
|
||||
@@ -269,6 +269,9 @@ rm -fr "qtbase-everywhere-src-$QT"
|
||||
tar xf "qtbase-everywhere-src-$QT.tar.xz"
|
||||
cd "qtbase-everywhere-src-$QT"
|
||||
|
||||
# Stop checkboxes in Fusion theme having such bright outlines.
|
||||
patch -p1 < "$SCRIPTDIR/qtbase-fusion-style.patch"
|
||||
|
||||
# since we don't have a direct reference to QtSvg, it doesn't deployed directly from the main binary
|
||||
# (only indirectly from iconengines), and the libqsvg.dylib imageformat plugin does not get deployed.
|
||||
# We could run macdeployqt twice, but that's even more janky than patching it.
|
||||
|
||||
@@ -193,6 +193,10 @@ echo Building Qt base...
|
||||
rmdir /S /Q "qtbase-everywhere-src-%QT%"
|
||||
%SEVENZIP% x "qtbase-everywhere-src-%QT%.zip" || goto error
|
||||
cd "qtbase-everywhere-src-%QT%" || goto error
|
||||
|
||||
rem Stop checkboxes in Fusion theme having such bright outlines.
|
||||
%PATCH% -p1 < "%SCRIPTDIR%\qtbase-fusion-style.patch" || goto error
|
||||
|
||||
cmake -B build %ARM64TOOLCHAIN% -DFEATURE_sql=OFF -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" -DQT_HOST_PATH="%X64INSTALLDIR%" %FORCEPDB% -DQT_GENERATE_SBOM=OFF -DINPUT_ssl=yes -DINPUT_openssl=no -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
|
||||
|
||||
@@ -194,6 +194,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 Stop checkboxes in Fusion theme having such bright outlines.
|
||||
%PATCH% -p1 < "%SCRIPTDIR%\qtbase-fusion-style.patch" || goto error
|
||||
|
||||
cmake -B build -DFEATURE_sql=OFF -DCMAKE_INSTALL_PREFIX="%INSTALLDIR%" %FORCEPDB% -DQT_GENERATE_SBOM=OFF -DINPUT_ssl=yes -DINPUT_openssl=no -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
|
||||
|
||||
19
scripts/deps/qtbase-fusion-style.patch
Normal file
19
scripts/deps/qtbase-fusion-style.patch
Normal file
@@ -0,0 +1,19 @@
|
||||
--- qtbase/src/widgets/styles/qfusionstyle.cpp 2025-09-03 17:32:08
|
||||
+++ qtbase/src/widgets/styles/qfusionstyle.cpp 2025-09-03 17:56:20
|
||||
@@ -588,11 +588,12 @@
|
||||
|
||||
painter->setBrush((state & State_Sunken) ? QBrush(pressedColor) : gradient);
|
||||
|
||||
- if (option->state & State_HasFocus && option->state & State_KeyboardFocusChange)
|
||||
+ if (option->state & State_HasFocus && option->state & State_KeyboardFocusChange) {
|
||||
painter->setPen(highlightedOutline);
|
||||
- else
|
||||
- painter->setPen(colorScheme() == Qt::ColorScheme::Dark ? outline.lighter(240)
|
||||
- : outline.lighter(110));
|
||||
+ } else {
|
||||
+ const bool isDark = (option->palette.windowText().color().value() > option->palette.window().color().value());
|
||||
+ painter->setPen(isDark ? outline.lighter(155) : outline.lighter(110));
|
||||
+ }
|
||||
painter->drawRect(rect);
|
||||
|
||||
QColor checkMarkColor = option->palette.text().color().darker(120);
|
||||
Reference in New Issue
Block a user