Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package QGnomePlatform for openSUSE:Factory checked in at 2023-05-23 14:54:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/QGnomePlatform (Old) and /work/SRC/openSUSE:Factory/.QGnomePlatform.new.1533 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "QGnomePlatform" Tue May 23 14:54:43 2023 rev:13 rq:1088551 version:0.9.1 Changes: -------- --- /work/SRC/openSUSE:Factory/QGnomePlatform/QGnomePlatform.changes 2023-04-07 18:17:01.256785508 +0200 +++ /work/SRC/openSUSE:Factory/.QGnomePlatform.new.1533/QGnomePlatform.changes 2023-05-23 14:55:20.930769061 +0200 @@ -1,0 +2,25 @@ +Thu May 11 14:31:26 UTC 2023 - Simon Vogl <[email protected]> + +- Update to version 0.9.1: + + Changes: + - Thinner border between window and decorations + - Added support for KColorScheme using Adwaita-like color + schemes + - Added integration for QtQuick Controls2 applications + - Added support for color-scheme in GSettings backend + - Implemented reasonable icon fallback - depends on Qt change + 476542 + - Qt6: implemented support for QPlatformTheme::MouseCursorSize + and QPlatformTheme::MouseCursorTheme + + Fixes: + - Do not crash when GSettings shema is not found + - Respect QT_STYLE_OVERRIDE env variable + - Fixed titlebar dimming on Wayland + - Fixed regression in rendering titlebar on vanilla Qt +- Drop 0001-fix-qt-6.5-compilation.patch as it is included in + version 0.9.1 +- Adjust fix-XSetTransientForHint.patch for version 0.9.1 +- Split QGnomePlatform's new color schemes into a new package + called "QGnomePlatform-colorschemes" + +------------------------------------------------------------------- Old: ---- 0001-fix-qt-6.5-compilation.patch QGnomePlatform-0.9.0.tar.gz New: ---- QGnomePlatform-0.9.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ QGnomePlatform.spec ++++++ --- /var/tmp/diff_new_pack.TM9CoW/_old 2023-05-23 14:55:21.466772232 +0200 +++ /var/tmp/diff_new_pack.TM9CoW/_new 2023-05-23 14:55:21.470772255 +0200 @@ -47,7 +47,7 @@ %define adwaitaqt_version 1.4.2 Name: QGnomePlatform%{?name_suffix} -Version: 0.9.0 +Version: 0.9.1 Release: 0 Summary: A better Qt application inclusion under GNOME # @@ -73,8 +73,6 @@ URL: https://github.com/FedoraQt/QGnomePlatform/ Source: %{url}/archive/%{version}.tar.gz#/QGnomePlatform-%{version}.tar.gz Patch0: fix-XSetTransientForHint.patch -# PATCH-FIX-UPSTREAM 0001-fix-qt-6.5-compilation.patch -- Fix build with qt-6.5 -Patch1: 0001-fix-qt-6.5-compilation.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -93,6 +91,7 @@ BuildRequires: cmake(Qt5Core) >= %{qt_min_version} BuildRequires: cmake(Qt5DBus) >= %{qt_min_version} BuildRequires: cmake(Qt5Gui) >= %{qt_min_version} +BuildRequires: cmake(Qt5QuickControls2) >= %{qt_min_version} BuildRequires: cmake(Qt5ThemeSupport) BuildRequires: cmake(Qt5WaylandClient) >= %{qt_min_version} BuildRequires: cmake(Qt5Widgets) >= %{qt_min_version} @@ -112,6 +111,7 @@ BuildRequires: cmake(Qt6Core) >= %{qt_min_version} BuildRequires: cmake(Qt6DBus) >= %{qt_min_version} BuildRequires: cmake(Qt6Gui) >= %{qt_min_version} +BuildRequires: cmake(Qt6QuickControls2) >= %{qt_min_version} BuildRequires: cmake(Qt6WaylandClient) >= %{qt_min_version} BuildRequires: cmake(Qt6Widgets) >= %{qt_min_version} Supplements: (libQt6Gui6 and gnome-session) @@ -120,12 +120,35 @@ # Runtime Dependencies # Requires: adwaita-%{flavor} +# Make all flavors depend on the same color schemes subpackage. (see below) +Requires: QGnomePlatform-colorschemes %description QGnomePlatform is a Qt Platform Theme designed to use as many of the GNOME settings as possible in unmodified Qt applications. It allows Qt applications to fit into the environment as well as possible. +# +# All flavors of QGnomePlaform depend on the same color scheme files. +# In order to avoid duplicatate production of the same package, +# we only produce the color schemes package when building the qt5 flavor. +# When removing the Qt5 flavor from this package, please ensure that the +# color schemes package is produced in another flavor's build instead. +# + +# Only produce the color schemes package when building the qt5 flavor. (see above) +%if 0%{?qt5} +%package -n QGnomePlatform-colorschemes +Summary: Color schemes for QGnomePlatform +Group: System/Libraries +BuildArch: noarch + +%description -n QGnomePlatform-colorschemes +QGnomePlatform is a Qt Platform Theme designed to use as many of the GNOME +settings as possible in unmodified Qt applications. It allows Qt applications +to fit into the environment as well as possible. +%endif + %prep %autosetup -p1 -n QGnomePlatform-%{version} @@ -151,6 +174,10 @@ %else %cmake_install %endif +# Only produce the color schemes package when building the qt5 flavor. (see above) +%if ! 0%{?qt5} +rm -r %{buildroot}%{_datadir}/color-schemes +%endif %files %doc README.md @@ -162,4 +189,14 @@ %{_qt_plugindir}/platformthemes/libqgnomeplatformtheme.so %{_qt_plugindir}/wayland-decoration-client/libqgnomeplatformdecoration.so +# Only produce the color schemes package when building the qt5 flavor. (see above) +%if 0%{?qt5} +%files -n QGnomePlatform-colorschemes +%dir %{_datadir}/color-schemes +%{_datadir}/color-schemes/Adwaita.colors +%{_datadir}/color-schemes/AdwaitaDark.colors +%{_datadir}/color-schemes/AdwaitaHighcontrast.colors +%{_datadir}/color-schemes/AdwaitaHighcontrastInverse.colors +%endif + %changelog ++++++ QGnomePlatform-0.9.0.tar.gz -> QGnomePlatform-0.9.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QGnomePlatform-0.9.0/.github/workflows/build.yaml new/QGnomePlatform-0.9.1/.github/workflows/build.yaml --- old/QGnomePlatform-0.9.0/.github/workflows/build.yaml 2022-09-20 10:48:55.000000000 +0200 +++ new/QGnomePlatform-0.9.1/.github/workflows/build.yaml 2023-05-11 08:44:18.000000000 +0200 @@ -23,7 +23,7 @@ sudo apt install cmake make pkg-config libx11-dev xcb libx11-xcb-dev libxkbcommon-dev libgtk-3-dev sassc - name: Install Qt - uses: jurplel/install-qt-action@v2 + uses: jurplel/install-qt-action@v3 with: version: 5.15.2 @@ -57,7 +57,7 @@ - name: Install Qt uses: jurplel/install-qt-action@v3 with: - version: 6.2.3 + version: 6.5.0 - name: Install Adwaita-qt run: | diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QGnomePlatform-0.9.0/CMakeLists.txt new/QGnomePlatform-0.9.1/CMakeLists.txt --- old/QGnomePlatform-0.9.0/CMakeLists.txt 2022-09-20 10:48:55.000000000 +0200 +++ new/QGnomePlatform-0.9.1/CMakeLists.txt 2023-05-11 08:44:18.000000000 +0200 @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.0) -set(QGNOMEPLATFORM_VERSION "0.9.0") +set(QGNOMEPLATFORM_VERSION "0.9.1") option(USE_QT6 "Use Qt6 instead of Qt5" OFF) @@ -36,6 +36,7 @@ DBus Gui Widgets + QuickControls2 ) find_package(Qt${QT_VERSION_MAJOR}Gui ${QT_MIN_VERSION} CONFIG REQUIRED Private) @@ -51,6 +52,17 @@ find_package(AdwaitaQt "1.4.2" REQUIRED) endif() + +if (NOT USE_QT6) + find_package(KF5QQC2DesktopStyle) + set_package_properties(KF5QQC2DesktopStyle PROPERTIES + DESCRIPTION "Styling for QtQuick Controls 2 applications" + TYPE RUNTIME) +else() + # TODO, the desktop style for Qt6 is not yet released +endif() + + find_package(PkgConfig REQUIRED) pkg_check_modules(GTK+3 REQUIRED IMPORTED_TARGET gtk+-3.0) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QGnomePlatform-0.9.0/src/CMakeLists.txt new/QGnomePlatform-0.9.1/src/CMakeLists.txt --- old/QGnomePlatform-0.9.0/src/CMakeLists.txt 2022-09-20 10:48:55.000000000 +0200 +++ new/QGnomePlatform-0.9.1/src/CMakeLists.txt 2023-05-11 08:44:18.000000000 +0200 @@ -1,3 +1,4 @@ +add_subdirectory(color-schemes) add_subdirectory(common) if (NOT DISABLE_DECORATION_SUPPORT) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QGnomePlatform-0.9.0/src/color-schemes/Adwaita.colors new/QGnomePlatform-0.9.1/src/color-schemes/Adwaita.colors --- old/QGnomePlatform-0.9.0/src/color-schemes/Adwaita.colors 1970-01-01 01:00:00.000000000 +0100 +++ new/QGnomePlatform-0.9.1/src/color-schemes/Adwaita.colors 2023-05-11 08:44:18.000000000 +0200 @@ -0,0 +1,120 @@ +[ColorEffects:Disabled] +Color=56,56,56 +ColorAmount=0 +ColorEffect=0 +ContrastAmount=0.65 +ContrastEffect=1 +IntensityAmount=0.1 +IntensityEffect=2 + +[ColorEffects:Inactive] +ChangeSelectionColor=true +Color=112,111,110 +ColorAmount=0.025 +ColorEffect=2 +ContrastAmount=0.1 +ContrastEffect=2 +Enable=false +IntensityAmount=0 +IntensityEffect=0 + +[Colors:Button] +BackgroundAlternate=241,239,238 +BackgroundNormal=241,239,238 +DecorationFocus=61,174,233 +DecorationHover=147,206,233 +ForegroundActive=61,174,233 +ForegroundInactive=127,140,141 +ForegroundLink=41,128,185 +ForegroundNegative=218,68,83 +ForegroundNeutral=198,92,0 +ForegroundNormal=55,61,63 +ForegroundPositive=39,174,96 +ForegroundVisited=127,140,141 + +[Colors:Complementary] +BackgroundAlternate=59,64,69 +BackgroundNormal=49,54,59 +DecorationFocus=30,146,255 +DecorationHover=61,174,230 +ForegroundActive=147,206,233 +ForegroundInactive=175,176,179 +ForegroundLink=61,174,230 +ForegroundNegative=231,76,60 +ForegroundNeutral=253,188,75 +ForegroundNormal=239,240,241 +ForegroundPositive=46,204,113 +ForegroundVisited=61,174,230 + +[Colors:Selection] +BackgroundAlternate=53,132,228 +BackgroundNormal=53,132,228 +DecorationFocus=61,174,233 +DecorationHover=147,206,233 +ForegroundActive=252,252,252 +ForegroundInactive=239,240,241 +ForegroundLink=253,188,75 +ForegroundNegative=176,55,69 +ForegroundNeutral=246,116,0 +ForegroundNormal=252,253,255 +ForegroundPositive=23,104,57 +ForegroundVisited=189,195,199 + +[Colors:Tooltip] +BackgroundAlternate=0,0,0 +BackgroundNormal=0,0,0 +DecorationFocus=61,174,233 +DecorationHover=147,206,233 +ForegroundActive=61,174,233 +ForegroundInactive=189,195,199 +ForegroundLink=41,128,185 +ForegroundNegative=218,68,83 +ForegroundNeutral=246,116,0 +ForegroundNormal=255,255,255 +ForegroundPositive=39,174,96 +ForegroundVisited=127,140,141 + +[Colors:View] +BackgroundAlternate=255,255,255 +BackgroundNormal=255,255,255 +DecorationFocus=61,174,233 +DecorationHover=147,206,233 +ForegroundActive=61,174,233 +ForegroundInactive=25,25,25 +ForegroundLink=41,128,185 +ForegroundNegative=218,68,83 +ForegroundNeutral=246,116,0 +ForegroundNormal=25,25,25 +ForegroundPositive=39,174,96 +ForegroundVisited=127,140,141 + +[Colors:Window] +BackgroundAlternate=246,245,244 +BackgroundNormal=246,245,244 +DecorationFocus=61,174,233 +DecorationHover=147,206,233 +ForegroundActive=61,174,233 +ForegroundInactive=127,140,141 +ForegroundLink=41,128,185 +ForegroundNegative=218,68,83 +ForegroundNeutral=246,116,0 +ForegroundNormal=54,59,61 +ForegroundPositive=39,174,96 +ForegroundVisited=127,140,141 + +[General] +ColorScheme=BreezeClassic +Name=Adwaita +TitlebarIsAccentColored=true +shadeSortColumn=true + +[KDE] +contrast=4 + +[WM] +activeBackground=222,219,215 +activeBlend=252,252,252 +activeForeground=54,59,61 +inactiveBackground=239,240,241 +inactiveBlend=75,71,67 +inactiveForeground=189,195,199 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QGnomePlatform-0.9.0/src/color-schemes/AdwaitaDark.colors new/QGnomePlatform-0.9.1/src/color-schemes/AdwaitaDark.colors --- old/QGnomePlatform-0.9.0/src/color-schemes/AdwaitaDark.colors 1970-01-01 01:00:00.000000000 +0100 +++ new/QGnomePlatform-0.9.1/src/color-schemes/AdwaitaDark.colors 2023-05-11 08:44:18.000000000 +0200 @@ -0,0 +1,147 @@ +[ColorEffects:Disabled] +Color=56,56,56 +ColorAmount=0 +ColorEffect=0 +ContrastAmount=0.65 +ContrastEffect=1 +IntensityAmount=0.1 +IntensityEffect=2 + +[ColorEffects:Inactive] +ChangeSelectionColor=true +Color=112,111,110 +ColorAmount=0.025 +ColorEffect=2 +ContrastAmount=0.1 +ContrastEffect=2 +Enable=false +IntensityAmount=0 +IntensityEffect=0 + +[Colors:Button] +BackgroundAlternate=52,52,52 +BackgroundNormal=52,52,52 +DecorationFocus=61,174,233 +DecorationHover=61,174,233 +ForegroundActive=61,174,233 +ForegroundInactive=161,169,177 +ForegroundLink=29,153,243 +ForegroundNegative=218,68,83 +ForegroundNeutral=246,116,0 +ForegroundNormal=238,238,236 +ForegroundPositive=39,174,96 +ForegroundVisited=155,89,182 + +[Colors:Complementary] +BackgroundAlternate=30,87,116 +BackgroundNormal=42,46,50 +DecorationFocus=61,174,233 +DecorationHover=61,174,233 +ForegroundActive=61,174,233 +ForegroundInactive=161,169,177 +ForegroundLink=29,153,243 +ForegroundNegative=218,68,83 +ForegroundNeutral=246,116,0 +ForegroundNormal=252,252,252 +ForegroundPositive=39,174,96 +ForegroundVisited=155,89,182 + +[Colors:Header] +BackgroundAlternate=49,54,59 +BackgroundNormal=49,54,59 +DecorationFocus=61,174,233 +DecorationHover=61,174,233 +ForegroundActive=61,174,233 +ForegroundInactive=161,169,177 +ForegroundLink=29,153,243 +ForegroundNegative=218,68,83 +ForegroundNeutral=246,116,0 +ForegroundNormal=252,252,252 +ForegroundPositive=39,174,96 +ForegroundVisited=155,89,182 + +[Colors:Header][Inactive] +BackgroundAlternate=49,54,59 +BackgroundNormal=42,46,50 +DecorationFocus=61,174,233 +DecorationHover=61,174,233 +ForegroundActive=61,174,233 +ForegroundInactive=161,169,177 +ForegroundLink=29,153,243 +ForegroundNegative=218,68,83 +ForegroundNeutral=246,116,0 +ForegroundNormal=252,252,252 +ForegroundPositive=39,174,96 +ForegroundVisited=155,89,182 + +[Colors:Selection] +BackgroundAlternate=21,83,158 +BackgroundNormal=21,83,158 +DecorationFocus=61,174,233 +DecorationHover=61,174,233 +ForegroundActive=252,252,252 +ForegroundInactive=161,169,177 +ForegroundLink=253,188,75 +ForegroundNegative=176,55,69 +ForegroundNeutral=198,92,0 +ForegroundNormal=252,253,254 +ForegroundPositive=23,104,57 +ForegroundVisited=155,89,182 + +[Colors:Tooltip] +BackgroundAlternate=255,255,255 +BackgroundNormal=255,255,255 +DecorationFocus=61,174,233 +DecorationHover=61,174,233 +ForegroundActive=61,174,233 +ForegroundInactive=161,169,177 +ForegroundLink=29,153,243 +ForegroundNegative=218,68,83 +ForegroundNeutral=246,116,0 +ForegroundNormal=0,0,0 +ForegroundPositive=39,174,96 +ForegroundVisited=155,89,182 + +[Colors:View] +BackgroundAlternate=45,45,45 +BackgroundNormal=45,45,45 +DecorationFocus=61,174,233 +DecorationHover=61,174,233 +ForegroundActive=61,174,233 +ForegroundInactive=161,169,177 +ForegroundLink=29,153,243 +ForegroundNegative=218,68,83 +ForegroundNeutral=246,116,0 +ForegroundNormal=255,255,255 +ForegroundPositive=39,174,96 +ForegroundVisited=155,89,182 + +[Colors:Window] +BackgroundAlternate=53,53,53 +BackgroundNormal=53,53,53 +DecorationFocus=61,174,233 +DecorationHover=61,174,233 +ForegroundActive=61,174,233 +ForegroundInactive=161,169,177 +ForegroundLink=29,153,243 +ForegroundNegative=218,68,83 +ForegroundNeutral=246,116,0 +ForegroundNormal=225,225,223 +ForegroundPositive=39,174,96 +ForegroundVisited=155,89,182 + +[General] +ColorScheme=BreezeDark +Name=AdwaitaDark +shadeSortColumn=true + +[KDE] +contrast=4 + +[WM] +activeBackground=41,41,41 +activeBlend=252,252,252 +activeForeground=225,225,223 +inactiveBackground=42,46,50 +inactiveBlend=161,169,177 +inactiveForeground=161,169,177 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QGnomePlatform-0.9.0/src/color-schemes/AdwaitaHighcontrast.colors new/QGnomePlatform-0.9.1/src/color-schemes/AdwaitaHighcontrast.colors --- old/QGnomePlatform-0.9.0/src/color-schemes/AdwaitaHighcontrast.colors 1970-01-01 01:00:00.000000000 +0100 +++ new/QGnomePlatform-0.9.1/src/color-schemes/AdwaitaHighcontrast.colors 2023-05-11 08:44:18.000000000 +0200 @@ -0,0 +1,120 @@ +[ColorEffects:Disabled] +Color=56,56,56 +ColorAmount=0 +ColorEffect=0 +ContrastAmount=0.65 +ContrastEffect=1 +IntensityAmount=0.1 +IntensityEffect=2 + +[ColorEffects:Inactive] +ChangeSelectionColor=true +Color=112,111,110 +ColorAmount=0.025 +ColorEffect=2 +ContrastAmount=0.1 +ContrastEffect=2 +Enable=false +IntensityAmount=0 +IntensityEffect=0 + +[Colors:Button] +BackgroundAlternate=248,246,245 +BackgroundNormal=248,246,245 +DecorationFocus=61,174,233 +DecorationHover=147,206,233 +ForegroundActive=61,174,233 +ForegroundInactive=127,140,141 +ForegroundLink=41,128,185 +ForegroundNegative=218,68,83 +ForegroundNeutral=198,92,0 +ForegroundNormal=47,52,54 +ForegroundPositive=39,174,96 +ForegroundVisited=127,140,141 + +[Colors:Complementary] +BackgroundAlternate=59,64,69 +BackgroundNormal=49,54,59 +DecorationFocus=30,146,255 +DecorationHover=61,174,230 +ForegroundActive=147,206,233 +ForegroundInactive=175,176,179 +ForegroundLink=61,174,230 +ForegroundNegative=231,76,60 +ForegroundNeutral=253,188,75 +ForegroundNormal=239,240,241 +ForegroundPositive=46,204,113 +ForegroundVisited=61,174,230 + +[Colors:Selection] +BackgroundAlternate=53,132,228 +BackgroundNormal=53,132,228 +DecorationFocus=61,174,233 +DecorationHover=147,206,233 +ForegroundActive=252,252,252 +ForegroundInactive=239,240,241 +ForegroundLink=253,188,75 +ForegroundNegative=176,55,69 +ForegroundNeutral=246,116,0 +ForegroundNormal=252,253,255 +ForegroundPositive=23,104,57 +ForegroundVisited=189,195,199 + +[Colors:Tooltip] +BackgroundAlternate=0,0,0 +BackgroundNormal=0,0,0 +DecorationFocus=61,174,233 +DecorationHover=147,206,233 +ForegroundActive=61,174,233 +ForegroundInactive=189,195,199 +ForegroundLink=41,128,185 +ForegroundNegative=218,68,83 +ForegroundNeutral=246,116,0 +ForegroundNormal=255,255,255 +ForegroundPositive=39,174,96 +ForegroundVisited=127,140,141 + +[Colors:View] +BackgroundAlternate=255,255,255 +BackgroundNormal=255,255,255 +DecorationFocus=61,174,233 +DecorationHover=147,206,233 +ForegroundActive=61,174,233 +ForegroundInactive=25,25,25 +ForegroundLink=41,128,185 +ForegroundNegative=218,68,83 +ForegroundNeutral=246,116,0 +ForegroundNormal=3,3,3 +ForegroundPositive=39,174,96 +ForegroundVisited=127,140,141 + +[Colors:Window] +BackgroundAlternate=253,253,252 +BackgroundNormal=253,253,252 +DecorationFocus=61,174,233 +DecorationHover=147,206,233 +ForegroundActive=61,174,233 +ForegroundInactive=127,140,141 +ForegroundLink=41,128,185 +ForegroundNegative=218,68,83 +ForegroundNeutral=246,116,0 +ForegroundNormal=42,47,49 +ForegroundPositive=39,174,96 +ForegroundVisited=127,140,141 + +[General] +ColorScheme=BreezeClassic +Name=AdwaitaHighcontrast +TitlebarIsAccentColored=true +shadeSortColumn=true + +[KDE] +contrast=4 + +[WM] +activeBackground=228,226,223 +activeBlend=252,252,252 +activeForeground=42,47,49 +inactiveBackground=239,240,241 +inactiveBlend=75,71,67 +inactiveForeground=189,195,199 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QGnomePlatform-0.9.0/src/color-schemes/AdwaitaHighcontrastInverse.colors new/QGnomePlatform-0.9.1/src/color-schemes/AdwaitaHighcontrastInverse.colors --- old/QGnomePlatform-0.9.0/src/color-schemes/AdwaitaHighcontrastInverse.colors 1970-01-01 01:00:00.000000000 +0100 +++ new/QGnomePlatform-0.9.1/src/color-schemes/AdwaitaHighcontrastInverse.colors 2023-05-11 08:44:18.000000000 +0200 @@ -0,0 +1,147 @@ +[ColorEffects:Disabled] +Color=56,56,56 +ColorAmount=0 +ColorEffect=0 +ContrastAmount=0.65 +ContrastEffect=1 +IntensityAmount=0.1 +IntensityEffect=2 + +[ColorEffects:Inactive] +ChangeSelectionColor=true +Color=112,111,110 +ColorAmount=0.025 +ColorEffect=2 +ContrastAmount=0.1 +ContrastEffect=2 +Enable=false +IntensityAmount=0 +IntensityEffect=0 + +[Colors:Button] +BackgroundAlternate=52,52,52 +BackgroundNormal=52,52,52 +DecorationFocus=61,174,233 +DecorationHover=61,174,233 +ForegroundActive=61,174,233 +ForegroundInactive=161,169,177 +ForegroundLink=29,153,243 +ForegroundNegative=218,68,83 +ForegroundNeutral=246,116,0 +ForegroundNormal=238,238,236 +ForegroundPositive=39,174,96 +ForegroundVisited=155,89,182 + +[Colors:Complementary] +BackgroundAlternate=30,87,116 +BackgroundNormal=42,46,50 +DecorationFocus=61,174,233 +DecorationHover=61,174,233 +ForegroundActive=61,174,233 +ForegroundInactive=161,169,177 +ForegroundLink=29,153,243 +ForegroundNegative=218,68,83 +ForegroundNeutral=246,116,0 +ForegroundNormal=252,252,252 +ForegroundPositive=39,174,96 +ForegroundVisited=155,89,182 + +[Colors:Header] +BackgroundAlternate=49,54,59 +BackgroundNormal=49,54,59 +DecorationFocus=61,174,233 +DecorationHover=61,174,233 +ForegroundActive=61,174,233 +ForegroundInactive=161,169,177 +ForegroundLink=29,153,243 +ForegroundNegative=218,68,83 +ForegroundNeutral=246,116,0 +ForegroundNormal=252,252,252 +ForegroundPositive=39,174,96 +ForegroundVisited=155,89,182 + +[Colors:Header][Inactive] +BackgroundAlternate=49,54,59 +BackgroundNormal=42,46,50 +DecorationFocus=61,174,233 +DecorationHover=61,174,233 +ForegroundActive=61,174,233 +ForegroundInactive=161,169,177 +ForegroundLink=29,153,243 +ForegroundNegative=218,68,83 +ForegroundNeutral=246,116,0 +ForegroundNormal=252,252,252 +ForegroundPositive=39,174,96 +ForegroundVisited=155,89,182 + +[Colors:Selection] +BackgroundAlternate=21,83,158 +BackgroundNormal=21,83,158 +DecorationFocus=61,174,233 +DecorationHover=61,174,233 +ForegroundActive=252,252,252 +ForegroundInactive=161,169,177 +ForegroundLink=253,188,75 +ForegroundNegative=176,55,69 +ForegroundNeutral=198,92,0 +ForegroundNormal=252,253,254 +ForegroundPositive=23,104,57 +ForegroundVisited=155,89,182 + +[Colors:Tooltip] +BackgroundAlternate=255,255,255 +BackgroundNormal=255,255,255 +DecorationFocus=61,174,233 +DecorationHover=61,174,233 +ForegroundActive=61,174,233 +ForegroundInactive=161,169,177 +ForegroundLink=29,153,243 +ForegroundNegative=218,68,83 +ForegroundNeutral=246,116,0 +ForegroundNormal=0,0,0 +ForegroundPositive=39,174,96 +ForegroundVisited=155,89,182 + +[Colors:View] +BackgroundAlternate=45,45,45 +BackgroundNormal=45,45,45 +DecorationFocus=61,174,233 +DecorationHover=61,174,233 +ForegroundActive=61,174,233 +ForegroundInactive=161,169,177 +ForegroundLink=29,153,243 +ForegroundNegative=218,68,83 +ForegroundNeutral=246,116,0 +ForegroundNormal=255,255,255 +ForegroundPositive=39,174,96 +ForegroundVisited=155,89,182 + +[Colors:Window] +BackgroundAlternate=53,53,53 +BackgroundNormal=53,53,53 +DecorationFocus=61,174,233 +DecorationHover=61,174,233 +ForegroundActive=61,174,233 +ForegroundInactive=161,169,177 +ForegroundLink=29,153,243 +ForegroundNegative=218,68,83 +ForegroundNeutral=246,116,0 +ForegroundNormal=225,225,223 +ForegroundPositive=39,174,96 +ForegroundVisited=155,89,182 + +[General] +ColorScheme=BreezeDark +Name=AdwaitaHighcontrastInverse +shadeSortColumn=true + +[KDE] +contrast=4 + +[WM] +activeBackground=41,41,41 +activeBlend=252,252,252 +activeForeground=225,225,223 +inactiveBackground=42,46,50 +inactiveBlend=161,169,177 +inactiveForeground=161,169,177 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QGnomePlatform-0.9.0/src/color-schemes/CMakeLists.txt new/QGnomePlatform-0.9.1/src/color-schemes/CMakeLists.txt --- old/QGnomePlatform-0.9.0/src/color-schemes/CMakeLists.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/QGnomePlatform-0.9.1/src/color-schemes/CMakeLists.txt 2023-05-11 08:44:18.000000000 +0200 @@ -0,0 +1,4 @@ +install(FILES Adwaita.colors DESTINATION ${CMAKE_INSTALL_DATADIR}/color-schemes/) +install(FILES AdwaitaDark.colors DESTINATION ${CMAKE_INSTALL_DATADIR}/color-schemes/) +install(FILES AdwaitaHighcontrast.colors DESTINATION ${CMAKE_INSTALL_DATADIR}/color-schemes/) +install(FILES AdwaitaHighcontrastInverse.colors DESTINATION ${CMAKE_INSTALL_DATADIR}/color-schemes/) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QGnomePlatform-0.9.0/src/common/gnomesettings.cpp new/QGnomePlatform-0.9.1/src/common/gnomesettings.cpp --- old/QGnomePlatform-0.9.0/src/common/gnomesettings.cpp 2022-09-20 10:48:55.000000000 +0200 +++ new/QGnomePlatform-0.9.1/src/common/gnomesettings.cpp 2023-05-11 08:44:18.000000000 +0200 @@ -18,8 +18,8 @@ */ #include "gnomesettings.h" -#include "hintprovider.h" #include "gsettingshintprovider.h" +#include "hintprovider.h" #include "portalhintprovider.h" #if QT_VERSION >= 0x060000 @@ -41,8 +41,8 @@ #include <QDBusConnection> #include <QDBusConnectionInterface> #include <QDBusMessage> -#include <QDBusPendingReply> #include <QDBusPendingCallWatcher> +#include <QDBusPendingReply> #include <QDBusReply> #include <QDBusServiceWatcher> @@ -103,7 +103,7 @@ watcher->setConnection(QDBusConnection::sessionBus()); watcher->setWatchMode(QDBusServiceWatcher::WatchForOwnerChange); watcher->addWatchedService(QString::fromLatin1("org.freedesktop.portal.Desktop")); - connect(watcher, &QDBusServiceWatcher::serviceOwnerChanged, this, [=] (const QString &service, const QString &oldOwner, const QString &newOwner) { + connect(watcher, &QDBusServiceWatcher::serviceOwnerChanged, this, [=](const QString &service, const QString &oldOwner, const QString &newOwner) { Q_UNUSED(service) if (newOwner.isEmpty()) { @@ -213,15 +213,15 @@ bool GnomeSettings::useGtkThemeDarkVariant() const { - const QString theme = m_hintProvider->gtkTheme(); - - if (m_hintProvider->canRelyOnAppearance()) { + QString theme = m_hintProvider->gtkTheme(); + if (qEnvironmentVariableIsSet("QT_STYLE_OVERRIDE")) { + /* If QT_STYLE_OVERRIDE we should rely on it */ + theme = QString::fromLocal8Bit(qgetenv("QT_STYLE_OVERRIDE")); + } else if (m_hintProvider->canRelyOnAppearance()) { return m_hintProvider->appearance() == PreferDark; } - return theme.toLower().contains("-dark") || - theme.toLower().endsWith("inverse") || - m_hintProvider->appearance() == PreferDark; + return theme.toLower().contains("-dark") || theme.toLower().endsWith("inverse") || m_hintProvider->appearance() == PreferDark; } bool GnomeSettings::useGtkThemeHighContrastVariant() const @@ -256,14 +256,34 @@ return m_hintProvider->titlebarButtonPlacement(); } +static QString colorScheme(bool useHighContrast, bool useDarkVariant) +{ + QString colorScheme; + if (useHighContrast) { + colorScheme = useDarkVariant ? QStringLiteral("AdwaitaHighcontrastInverse") : QStringLiteral("AdwaitaHighcontrast"); + } else { + colorScheme = useDarkVariant ? QStringLiteral("AdwaitaDark") : QStringLiteral("Adwaita"); + } + + return QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("color-schemes/") + colorScheme + QStringLiteral(".colors")); +} + void GnomeSettings::loadPalette() { if (useGtkThemeHighContrastVariant()) { - m_palette = new QPalette( - Adwaita::Colors::palette(useGtkThemeDarkVariant() ? Adwaita::ColorVariant::AdwaitaHighcontrastInverse : Adwaita::ColorVariant::AdwaitaHighcontrast)); + m_palette = new QPalette(Adwaita::Colors::palette(useGtkThemeDarkVariant() ? Adwaita::ColorVariant::AdwaitaHighcontrastInverse + : Adwaita::ColorVariant::AdwaitaHighcontrast)); } else { m_palette = new QPalette(Adwaita::Colors::palette(useGtkThemeDarkVariant() ? Adwaita::ColorVariant::AdwaitaDark : Adwaita::ColorVariant::Adwaita)); } + + const QString colorSchemePath = colorScheme(useGtkThemeHighContrastVariant(), useGtkThemeDarkVariant()); + if (colorSchemePath.isEmpty()) { + qCWarning(QGnomePlatform) << "Could not find color scheme " << colorSchemePath; + return; + } + + qApp->setProperty("KDE_COLOR_SCHEME_PATH", colorSchemePath); } void GnomeSettings::onCursorBlinkTimeChanged() @@ -367,7 +387,10 @@ // 2) Use GTK theme if (!gtkTheme.isEmpty()) { - const QStringList adwaitaStyles = { QStringLiteral("adwaita"), QStringLiteral("adwaita-dark"), QStringLiteral("highcontrast"), QStringLiteral("highcontrastinverse") }; + const QStringList adwaitaStyles = {QStringLiteral("adwaita"), + QStringLiteral("adwaita-dark"), + QStringLiteral("highcontrast"), + QStringLiteral("highcontrastinverse")}; if (adwaitaStyles.contains(gtkTheme.toLower())) { QString theme = gtkTheme; @@ -405,8 +428,7 @@ } // 5) Use other styles - styleNames << QStringLiteral("fusion") - << QStringLiteral("windows"); + styleNames << QStringLiteral("fusion") << QStringLiteral("windows"); return styleNames; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QGnomePlatform-0.9.0/src/common/gnomesettings.h new/QGnomePlatform-0.9.1/src/common/gnomesettings.h --- old/QGnomePlatform-0.9.0/src/common/gnomesettings.h 2022-09-20 10:48:55.000000000 +0200 +++ new/QGnomePlatform-0.9.1/src/common/gnomesettings.h 2023-05-11 08:44:18.000000000 +0200 @@ -73,6 +73,7 @@ void onThemeChanged(); void onHintProviderChanged(); + private: void configureKvantum(const QString &theme) const; void initializeHintProvider() const; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QGnomePlatform-0.9.0/src/common/gsettingshintprovider.cpp new/QGnomePlatform-0.9.1/src/common/gsettingshintprovider.cpp --- old/QGnomePlatform-0.9.0/src/common/gsettingshintprovider.cpp 2022-09-20 10:48:55.000000000 +0200 +++ new/QGnomePlatform-0.9.1/src/common/gsettingshintprovider.cpp 2023-05-11 08:44:18.000000000 +0200 @@ -58,6 +58,7 @@ // Watch for changes QStringList watchListDesktopInterface = {"changed::gtk-theme", + "changed::color-scheme", "changed::icon-theme", "changed::cursor-blink-time", "changed::font-name", @@ -77,14 +78,16 @@ g_signal_connect(m_gnomeDesktopSettings, watchedProperty.toStdString().c_str(), G_CALLBACK(gsettingPropertyChanged), this); } + m_canRelyOnAppearance = true; + loadCursorBlinkTime(); loadCursorSize(); loadCursorTheme(); - loadIconTheme(); loadFonts(); loadStaticHints(); loadTheme(); loadTitlebar(); + loadIconTheme(); } GSettingsHintProvider::~GSettingsHintProvider() @@ -96,7 +99,6 @@ g_object_unref(m_settings); } - void GSettingsHintProvider::gsettingPropertyChanged(GSettings *settings, gchar *key, GSettingsHintProvider *hintProvider) { Q_UNUSED(settings) @@ -105,7 +107,7 @@ qCDebug(QGnomePlatformGSettingsHintProvider) << "GSetting property change: " << key; - if (changedProperty == QStringLiteral("gtk-theme")) { + if (changedProperty == QStringLiteral("gtk-theme") || changedProperty == QStringLiteral("color-scheme")) { hintProvider->loadTheme(); Q_EMIT hintProvider->themeChanged(); } else if (changedProperty == QStringLiteral("icon-theme")) { @@ -114,13 +116,13 @@ } else if (changedProperty == QStringLiteral("cursor-blink-time")) { hintProvider->loadCursorBlinkTime(); Q_EMIT hintProvider->cursorBlinkTimeChanged(); - } else if (changedProperty == QStringLiteral("font-name") || - changedProperty == QStringLiteral("monospace-font-name") || - changedProperty == QStringLiteral("titlebar-font")) { + } else if (changedProperty == QStringLiteral("font-name") || changedProperty == QStringLiteral("monospace-font-name") + || changedProperty == QStringLiteral("titlebar-font")) { hintProvider->loadFonts(); Q_EMIT hintProvider->fontChanged(); } else if (changedProperty == QStringLiteral("cursor-size")) { - hintProvider->loadCursorSize();; + hintProvider->loadCursorSize(); + ; Q_EMIT hintProvider->fontChanged(); } else if (changedProperty == QStringLiteral("cursor-theme")) { hintProvider->loadCursorTheme(); @@ -172,10 +174,9 @@ void GSettingsHintProvider::loadTheme() { - bool isDarkTheme; - g_object_get(gtk_settings_get_default(), "gtk-application-prefer-dark-theme", &isDarkTheme, NULL); + const QString colorScheme = getSettingsProperty<QString>(QStringLiteral("color-scheme")); const QString theme = getSettingsProperty<QString>(QStringLiteral("gtk-theme")); - const GnomeSettings::Appearance appearance = isDarkTheme ? GnomeSettings::PreferDark : GnomeSettings::PreferLight; + const GnomeSettings::Appearance appearance = colorScheme == QStringLiteral("prefer-dark") ? GnomeSettings::PreferDark : GnomeSettings::PreferLight; setTheme(theme, appearance); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QGnomePlatform-0.9.0/src/common/gsettingshintprovider.h new/QGnomePlatform-0.9.1/src/common/gsettingshintprovider.h --- old/QGnomePlatform-0.9.0/src/common/gsettingshintprovider.h 2022-09-20 10:48:55.000000000 +0200 +++ new/QGnomePlatform-0.9.1/src/common/gsettingshintprovider.h 2023-05-11 08:44:18.000000000 +0200 @@ -63,4 +63,3 @@ }; #endif // GSETTINGS_HINT_PROVIDER_H - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QGnomePlatform-0.9.0/src/common/hintprovider.cpp new/QGnomePlatform-0.9.1/src/common/hintprovider.cpp --- old/QGnomePlatform-0.9.0/src/common/hintprovider.cpp 2022-09-20 10:48:55.000000000 +0200 +++ new/QGnomePlatform-0.9.1/src/common/hintprovider.cpp 2023-05-11 08:44:18.000000000 +0200 @@ -24,11 +24,12 @@ #include <QDialogButtonBox> #include <QFont> +#include <QGuiApplication> #include <QLoggingCategory> Q_LOGGING_CATEGORY(QGnomePlatformHintProvider, "qt.qpa.qgnomeplatform.hintprovider") -HintProvider::HintProvider(QObject* parent) +HintProvider::HintProvider(QObject *parent) : QObject(parent) { // Generic hints shared with all providers @@ -39,7 +40,8 @@ m_hints[QPlatformTheme::PasswordMaskCharacter] = QVariant(QChar(0x2022)); } -HintProvider::~HintProvider() { +HintProvider::~HintProvider() +{ qDeleteAll(m_fonts); } @@ -56,22 +58,41 @@ void HintProvider::setCursorSize(int cursorSize) { m_cursorSize = cursorSize; +#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) + m_hints[QPlatformTheme::MouseCursorSize] = QSize(cursorSize, cursorSize); +#endif } void HintProvider::setCursorTheme(const QString &cursorTheme) { m_cursorTheme = cursorTheme; +#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) + m_hints[QPlatformTheme::MouseCursorTheme] = cursorTheme; +#endif } void HintProvider::setIconTheme(const QString &iconTheme) { - if (!iconTheme.isEmpty()) { - qCDebug(QGnomePlatformHintProvider) << "Icon theme: " << iconTheme; + bool useDarkTheme = false; + if (m_canRelyOnAppearance) { + useDarkTheme = m_appearance == GnomeSettings::PreferDark; + } else { + useDarkTheme = m_gtkTheme.toLower().contains("-dark") || m_gtkTheme.toLower().endsWith("inverse") || m_appearance == GnomeSettings::PreferDark; + } + + const QString breezeTheme = useDarkTheme ? QStringLiteral("breeze-dark") : QStringLiteral("breeze"); + const QString adwaitaTheme = QStringLiteral("Adwaita"); + + if (!iconTheme.isEmpty() && iconTheme != adwaitaTheme) { m_hints[QPlatformTheme::SystemIconThemeName] = iconTheme; - m_hints[QPlatformTheme::SystemIconFallbackThemeName] = "Adwaita"; + m_hints[QPlatformTheme::SystemIconFallbackThemeName] = adwaitaTheme; } else { - m_hints[QPlatformTheme::SystemIconThemeName] = "Adwaita"; + m_hints[QPlatformTheme::SystemIconThemeName] = adwaitaTheme; + m_hints[QPlatformTheme::SystemIconFallbackThemeName] = breezeTheme; } + + qCDebug(QGnomePlatformHintProvider) << "Icon theme: " << m_hints[QPlatformTheme::SystemIconThemeName].toString(); + qCDebug(QGnomePlatformHintProvider) << "Fallback icon theme: " << m_hints[QPlatformTheme::SystemIconFallbackThemeName].toString(); } void HintProvider::setFonts(const QString &systemFont, const QString &monospaceFont, const QString &titlebarFont) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QGnomePlatform-0.9.0/src/common/hintprovider.h new/QGnomePlatform-0.9.1/src/common/hintprovider.h --- old/QGnomePlatform-0.9.0/src/common/hintprovider.h 2022-09-20 10:48:55.000000000 +0200 +++ new/QGnomePlatform-0.9.1/src/common/hintprovider.h 2023-05-11 08:44:18.000000000 +0200 @@ -22,8 +22,8 @@ #include "gnomesettings.h" -#include <QObject> #include <QHash> +#include <QObject> #include <QVariant> #include <qpa/qplatformtheme.h> @@ -38,25 +38,52 @@ explicit HintProvider(QObject *parent = nullptr); virtual ~HintProvider(); - inline QHash<QPlatformTheme::ThemeHint, QVariant> hints() const { return m_hints; } - inline QHash<QPlatformTheme::Font, QFont *> fonts() const { return m_fonts; } + inline QHash<QPlatformTheme::ThemeHint, QVariant> hints() const + { + return m_hints; + } + inline QHash<QPlatformTheme::Font, QFont *> fonts() const + { + return m_fonts; + } // Theme - inline QString gtkTheme() const { return m_gtkTheme; } - inline GnomeSettings::Appearance appearance() const { return m_appearance; } + inline QString gtkTheme() const + { + return m_gtkTheme; + } + inline GnomeSettings::Appearance appearance() const + { + return m_appearance; + } // Whether we can assume e.g. Adwaita-dark should be used when Appearance == PreferDark // even though the theme is set to Adwaita // Used only when color-scheme from org.freedesktop.Appearance interface is implemented // in the xdg-desktop-portal backend - inline bool canRelyOnAppearance() const { return m_canRelyOnAppearance; } + inline bool canRelyOnAppearance() const + { + return m_canRelyOnAppearance; + } // Cursor - inline int cursorSize() const { return m_cursorSize; } - inline QString cursorTheme() const { return m_cursorTheme; } + inline int cursorSize() const + { + return m_cursorSize; + } + inline QString cursorTheme() const + { + return m_cursorTheme; + } // Window decorations - inline GnomeSettings::TitlebarButtons titlebarButtons() const { return m_titlebarButtons; } - inline GnomeSettings::TitlebarButtonsPlacement titlebarButtonPlacement() const { return m_titlebarButtonPlacement; } + inline GnomeSettings::TitlebarButtons titlebarButtons() const + { + return m_titlebarButtons; + } + inline GnomeSettings::TitlebarButtonsPlacement titlebarButtonPlacement() const + { + return m_titlebarButtonPlacement; + } Q_SIGNALS: void cursorBlinkTimeChanged(); @@ -95,5 +122,3 @@ }; #endif // GNOME_SETTINGS_P_H - - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QGnomePlatform-0.9.0/src/common/portalhintprovider.cpp new/QGnomePlatform-0.9.1/src/common/portalhintprovider.cpp --- old/QGnomePlatform-0.9.0/src/common/portalhintprovider.cpp 2022-09-20 10:48:55.000000000 +0200 +++ new/QGnomePlatform-0.9.1/src/common/portalhintprovider.cpp 2023-05-11 08:44:18.000000000 +0200 @@ -20,7 +20,6 @@ #include "portalhintprovider.h" // QtDBus -#include <QtDBus/QtDBus> #include <QDBusArgument> #include <QDBusConnection> #include <QDBusMessage> @@ -30,11 +29,11 @@ #include <QDBusVariant> #include <QLoggingCategory> #include <QVariant> +#include <QtDBus/QtDBus> Q_LOGGING_CATEGORY(QGnomePlatformPortalHintProvider, "qt.qpa.qgnomeplatform.portalhintprovider") -const QDBusArgument -&operator>>(const QDBusArgument &argument, QMap<QString, QVariantMap> &map) +const QDBusArgument &operator>>(const QDBusArgument &argument, QMap<QString, QVariantMap> &map) { argument.beginMap(); map.clear(); @@ -59,7 +58,9 @@ QStringLiteral("/org/freedesktop/portal/desktop"), QStringLiteral("org.freedesktop.portal.Settings"), QStringLiteral("ReadAll")); - message << QStringList{{QStringLiteral("org.gnome.desktop.interface")}, {QStringLiteral("org.gnome.desktop.wm.preferences")}, {QStringLiteral("org.freedesktop.appearance")}}; + message << QStringList{{QStringLiteral("org.gnome.desktop.interface")}, + {QStringLiteral("org.gnome.desktop.wm.preferences")}, + {QStringLiteral("org.freedesktop.appearance")}}; qCDebug(QGnomePlatformPortalHintProvider) << "Reading settings from xdg-desktop-portal"; if (asynchronous) { @@ -103,11 +104,11 @@ loadCursorBlinkTime(); loadCursorSize(); loadCursorTheme(); - loadIconTheme(); loadFonts(); loadStaticHints(); loadTheme(); loadTitlebar(); + loadIconTheme(); } void PortalHintProvider::settingChanged(const QString &group, const QString &key, const QDBusVariant &value) { @@ -123,13 +124,11 @@ } else if (key == QStringLiteral("cursor-blink-time")) { loadCursorBlinkTime(); Q_EMIT cursorBlinkTimeChanged(); - } else if (key == QStringLiteral("font-name") || - key == QStringLiteral("monospace-font-name") || - key == QStringLiteral("titlebar-font")) { + } else if (key == QStringLiteral("font-name") || key == QStringLiteral("monospace-font-name") || key == QStringLiteral("titlebar-font")) { loadFonts(); Q_EMIT fontChanged(); } else if (key == QStringLiteral("cursor-size")) { - loadCursorSize();; + loadCursorSize(); Q_EMIT fontChanged(); } else if (key == QStringLiteral("cursor-theme")) { loadCursorTheme(); @@ -167,8 +166,10 @@ void PortalHintProvider::loadFonts() { const QString fontName = m_portalSettings.value(QStringLiteral("org.gnome.desktop.interface")).value(QStringLiteral("font-name")).toString(); - const QString monospaceFontName = m_portalSettings.value(QStringLiteral("org.gnome.desktop.interface")).value(QStringLiteral("monospace-font-name")).toString(); - const QString titlebarFontName = m_portalSettings.value(QStringLiteral("org.gnome.desktop.wm.preferences")).value(QStringLiteral("titlebar-font")).toString(); + const QString monospaceFontName = + m_portalSettings.value(QStringLiteral("org.gnome.desktop.interface")).value(QStringLiteral("monospace-font-name")).toString(); + const QString titlebarFontName = + m_portalSettings.value(QStringLiteral("org.gnome.desktop.wm.preferences")).value(QStringLiteral("titlebar-font")).toString(); setFonts(fontName, monospaceFontName, titlebarFontName); } @@ -181,7 +182,8 @@ void PortalHintProvider::loadTheme() { const QString theme = m_portalSettings.value(QStringLiteral("org.gnome.desktop.interface")).value(QStringLiteral("gtk-theme")).toString(); - const GnomeSettings::Appearance appearance = static_cast<GnomeSettings::Appearance>(m_portalSettings.value(QStringLiteral("org.freedesktop.appearance")).value(QStringLiteral("color-scheme")).toUInt()); + const GnomeSettings::Appearance appearance = static_cast<GnomeSettings::Appearance>( + m_portalSettings.value(QStringLiteral("org.freedesktop.appearance")).value(QStringLiteral("color-scheme")).toUInt()); setTheme(theme, appearance); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QGnomePlatform-0.9.0/src/common/portalhintprovider.h new/QGnomePlatform-0.9.1/src/common/portalhintprovider.h --- old/QGnomePlatform-0.9.0/src/common/portalhintprovider.h 2022-09-20 10:48:55.000000000 +0200 +++ new/QGnomePlatform-0.9.1/src/common/portalhintprovider.h 2023-05-11 08:44:18.000000000 +0200 @@ -53,9 +53,6 @@ void loadStaticHints(); QMap<QString, QVariantMap> m_portalSettings; - }; #endif // PORTAL_HINT_PROVIDER_H - - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QGnomePlatform-0.9.0/src/common/utils.cpp new/QGnomePlatform-0.9.1/src/common/utils.cpp --- old/QGnomePlatform-0.9.0/src/common/utils.cpp 2022-09-20 10:48:55.000000000 +0200 +++ new/QGnomePlatform-0.9.1/src/common/utils.cpp 2023-05-11 08:44:18.000000000 +0200 @@ -23,10 +23,11 @@ #include <pango/pango.h> -namespace Utils { +namespace Utils +{ // FIXME: duplicate -QFont* qt_fontFromString(const QString &name) +QFont *qt_fontFromString(const QString &name) { QFont *font = new QFont(QLatin1String("Sans"), 10); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QGnomePlatform-0.9.0/src/common/utils.h new/QGnomePlatform-0.9.1/src/common/utils.h --- old/QGnomePlatform-0.9.0/src/common/utils.h 2022-09-20 10:48:55.000000000 +0200 +++ new/QGnomePlatform-0.9.1/src/common/utils.h 2023-05-11 08:44:18.000000000 +0200 @@ -25,10 +25,11 @@ class QFont; class QString; -namespace Utils { - QFont* qt_fontFromString(const QString &name); - GnomeSettings::TitlebarButtons titlebarButtonsFromString(const QString &layout); - GnomeSettings::TitlebarButtonsPlacement titlebarButtonPlacementFromString(const QString &layout); +namespace Utils +{ +QFont *qt_fontFromString(const QString &name); +GnomeSettings::TitlebarButtons titlebarButtonsFromString(const QString &layout); +GnomeSettings::TitlebarButtonsPlacement titlebarButtonPlacementFromString(const QString &layout); } #endif // UTILS_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QGnomePlatform-0.9.0/src/decoration/qgnomeplatformdecoration.cpp new/QGnomePlatform-0.9.1/src/decoration/qgnomeplatformdecoration.cpp --- old/QGnomePlatform-0.9.0/src/decoration/qgnomeplatformdecoration.cpp 2022-09-20 10:48:55.000000000 +0200 +++ new/QGnomePlatform-0.9.1/src/decoration/qgnomeplatformdecoration.cpp 2023-05-11 08:44:18.000000000 +0200 @@ -67,6 +67,7 @@ #define SHADOWS_WIDTH 10 #define TITLEBAR_HEIGHT 37 #define WINDOW_BORDER_WIDTH 1 +#define TITLEBAR_SEPARATOR_SIZE 0.5 Q_DECL_IMPORT void qt_blurImage(QPainter *p, QImage &blurImage, qreal radius, bool quality, bool alphaOnly, int transposed = 0); @@ -81,11 +82,11 @@ option.setWrapMode(QTextOption::NoWrap); m_windowTitle.setTextOption(option); - connect(&GnomeSettings::getInstance(), &GnomeSettings::themeChanged, this, [this] () { + connect(&GnomeSettings::getInstance(), &GnomeSettings::themeChanged, this, [this]() { loadConfiguration(); forceRepaint(); }); - connect(&GnomeSettings::getInstance(), &GnomeSettings::titlebarChanged, this, [this] () { + connect(&GnomeSettings::getInstance(), &GnomeSettings::titlebarChanged, this, [this]() { loadConfiguration(); forceRepaint(); }); @@ -128,8 +129,8 @@ const bool maximizeEnabled = GnomeSettings::getInstance().titlebarButtons().testFlag(GnomeSettings::getInstance().MaximizeButton); if (GnomeSettings::getInstance().titlebarButtonPlacement() == GnomeSettings::getInstance().RightPlacement) { - return QRectF(windowContentGeometry().width() - BUTTON_WIDTH * (maximizeEnabled ? 3 : 2) - (BUTTON_SPACING * (maximizeEnabled ? 2 : 1)) - - BUTTON_MARGINS - margins().right(), + return QRectF(windowContentGeometry().width() - BUTTON_WIDTH * (maximizeEnabled ? 3 : 2) - (BUTTON_SPACING * (maximizeEnabled ? 2 : 1)) - BUTTON_MARGINS + - margins().right(), (margins().top() - BUTTON_WIDTH + margins().bottom()) / 2, BUTTON_WIDTH, BUTTON_WIDTH); @@ -195,7 +196,14 @@ void QGnomePlatformDecoration::paint(QPaintDevice *device) { +#ifdef DECORATION_SHADOWS_SUPPORT // Qt 6.2.0+ or patched QtWayland + const Qt::WindowStates windowStates = waylandWindow()->windowStates(); + const bool active = windowStates & Qt::WindowActive; +#else + const Qt::WindowStates windowStates = window()->windowStates(); const bool active = window()->handle()->isActive(); +#endif + const QRect surfaceRect = windowContentGeometry(); const QColor borderColor = active ? m_borderColor : m_borderInactiveColor; @@ -203,7 +211,7 @@ p.setRenderHint(QPainter::Antialiasing); #ifdef DECORATION_SHADOWS_SUPPORT // Qt 6.2.0+ or patched QtWayland - const bool maximized = waylandWindow()->windowStates() & Qt::WindowMaximized; + const bool maximized = windowStates & Qt::WindowMaximized; const bool tiledLeft = waylandWindow()->toplevelWindowTilingStates() & QWaylandWindow::WindowTiledLeft; const bool tiledRight = waylandWindow()->toplevelWindowTilingStates() & QWaylandWindow::WindowTiledRight; const bool tiledTop = waylandWindow()->toplevelWindowTilingStates() & QWaylandWindow::WindowTiledTop; @@ -372,7 +380,7 @@ // * * // ******************************** QPainterPath borderRect; - if (!(window()->windowStates() & Qt::WindowMaximized)) { + if (!(windowStates & Qt::WindowMaximized)) { borderRect.addRoundedRect(0, 0, surfaceRect.width(), margins().top() + 8, 10, 10); p.fillPath(borderRect.simplified(), borderColor); } @@ -390,7 +398,7 @@ // * * // ******************************** QPainterPath roundedRect; - if ((window()->windowStates() & Qt::WindowMaximized)) { + if ((windowStates & Qt::WindowMaximized)) { roundedRect.addRect(0, 0, surfaceRect.width(), margins().top() + 8); } else { roundedRect @@ -414,7 +422,7 @@ // *| |* // *------------------------------* // ******************************** - if (!(window()->windowStates() & Qt::WindowMaximized)) { + if (!(windowStates & Qt::WindowMaximized)) { QPainterPath borderPath; // Left borderPath.addRect(0, margins().top(), margins().left(), surfaceRect.height() - margins().top() - WINDOW_BORDER_WIDTH); @@ -442,7 +450,10 @@ // ******************************** p.save(); p.setPen(borderColor); - p.drawLine(margins().left(), margins().top() - WINDOW_BORDER_WIDTH, surfaceRect.width() - margins().right(), margins().top() - WINDOW_BORDER_WIDTH); + p.drawLine(QLineF(margins().left(), + margins().top() - TITLEBAR_SEPARATOR_SIZE, + surfaceRect.width() - margins().right(), + margins().top() - TITLEBAR_SEPARATOR_SIZE)); p.restore(); // Window title @@ -499,7 +510,7 @@ if (GnomeSettings::getInstance().titlebarButtons().testFlag(GnomeSettings::getInstance().MaximizeButton)) { renderButton(&p, maximizeButtonRect(), - (window()->windowStates() & Qt::WindowMaximized) ? Adwaita::ButtonType::ButtonRestore : Adwaita::ButtonType::ButtonMaximize, + (windowStates & Qt::WindowMaximized) ? Adwaita::ButtonType::ButtonRestore : Adwaita::ButtonType::ButtonMaximize, m_maximizeButtonHovered && active, m_clicking == Button::Maximize || m_clicking == Button::Restore); } @@ -604,9 +615,11 @@ if (handled) { if (closeButtonRect().contains(local)) { QWindowSystemInterface::handleCloseEvent(window()); - } else if (GnomeSettings::getInstance().titlebarButtons().testFlag(GnomeSettings::getInstance().MaximizeButton) && maximizeButtonRect().contains(local)) { + } else if (GnomeSettings::getInstance().titlebarButtons().testFlag(GnomeSettings::getInstance().MaximizeButton) + && maximizeButtonRect().contains(local)) { window()->setWindowStates(window()->windowStates() ^ Qt::WindowMaximized); - } else if (GnomeSettings::getInstance().titlebarButtons().testFlag(GnomeSettings::getInstance().MinimizeButton) && minimizeButtonRect().contains(local)) { + } else if (GnomeSettings::getInstance().titlebarButtons().testFlag(GnomeSettings::getInstance().MinimizeButton) + && minimizeButtonRect().contains(local)) { window()->setWindowState(Qt::WindowMinimized); } else if (local.y() <= margins().top()) { waylandWindow()->shellSurface()->move(inputDevice); @@ -620,7 +633,7 @@ QRect QGnomePlatformDecoration::windowContentGeometry() const { -#if QT_VERSION >= 0x060000 +#ifdef DECORATION_SHADOWS_SUPPORT // Qt 6.2.0+ or patched QtWayland return waylandWindow()->windowContentGeometry() + margins(ShadowsOnly); #else return waylandWindow()->windowContentGeometry(); @@ -774,7 +787,13 @@ void QGnomePlatformDecoration::renderButton(QPainter *painter, const QRectF &rect, Adwaita::ButtonType button, bool renderFrame, bool sunken) { +#ifdef DECORATION_SHADOWS_SUPPORT // Qt 6.2.0+ or patched QtWayland + const Qt::WindowStates windowStates = waylandWindow()->windowStates(); + const bool active = windowStates & Qt::WindowActive; +#else + const Qt::WindowStates windowStates = window()->windowStates(); const bool active = window()->handle()->isActive(); +#endif Adwaita::StyleOptions decorationButtonStyle(painter, QRect()); decorationButtonStyle.setColor(active ? m_foregroundColor : m_foregroundInactiveColor); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QGnomePlatform-0.9.0/src/theme/CMakeLists.txt new/QGnomePlatform-0.9.1/src/theme/CMakeLists.txt --- old/QGnomePlatform-0.9.0/src/theme/CMakeLists.txt 2022-09-20 10:48:55.000000000 +0200 +++ new/QGnomePlatform-0.9.1/src/theme/CMakeLists.txt 2023-05-11 08:44:18.000000000 +0200 @@ -16,6 +16,7 @@ Qt${QT_VERSION_MAJOR}::DBus Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::GuiPrivate + Qt${QT_VERSION_MAJOR}::QuickControls2 ${ADWAITAQT_LIBRARIES} PkgConfig::GTK+3 ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QGnomePlatform-0.9.0/src/theme/qgnomeplatformtheme.cpp new/QGnomePlatform-0.9.1/src/theme/qgnomeplatformtheme.cpp --- old/QGnomePlatform-0.9.0/src/theme/qgnomeplatformtheme.cpp 2022-09-20 10:48:55.000000000 +0200 +++ new/QGnomePlatform-0.9.1/src/theme/qgnomeplatformtheme.cpp 2023-05-11 08:44:18.000000000 +0200 @@ -25,6 +25,8 @@ #include <QApplication> #include <QGuiApplication> +#include <QLoggingCategory> +#include <QQuickStyle> #include <QStyleFactory> #undef signals @@ -43,6 +45,8 @@ #include <QtGui/private/qgenericunixthemes_p.h> #endif +Q_LOGGING_CATEGORY(QGnomePlatformThemeLog, "qt.qpa.qgnomeplatform.theme") + void gtkMessageHandler(const gchar *log_domain, GLogLevelFlags log_level, const gchar *message, gpointer unused_data) { /* Silence false-positive Gtk warnings (we are using Xlib to set @@ -83,10 +87,33 @@ g_type_ensure(PANGO_TYPE_FONT_FAMILY); g_type_ensure(PANGO_TYPE_FONT_FACE); -#if QT_VERSION > 0x060000 +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) // Load QGnomeTheme m_platformTheme = QGenericUnixTheme::createUnixTheme(QLatin1String("gnome")); #endif + + // Configure the Qt Quick Controls 2 style to the KDE desktop style, + // Which passes the QtWidgets theme through to Qt Quick Controls. + // From https://invent.kde.org/plasma/plasma-integration/-/blob/02fe12a55522a43de3efa6de2185a695ff2a576a/src/platformtheme/kdeplatformtheme.cpp#L582 + + // if the user has explicitly set something else, don't meddle + // Also ignore the default Fusion style + if (!QQuickStyle::name().isEmpty() && QQuickStyle::name() != QLatin1String("Fusion")) { + return; + } + + // Unfortunately we only have a way to check this on Qt5 + // On Qt6 this should just fall back to the Fusion style automatically. +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) + if (!QQuickStyle::availableStyles().contains(QStringLiteral("org.kde.desktop"))) { + qCWarning(QGnomePlatformThemeLog) << "The desktop style for QtQuick Controls 2 applications" + << "is not available on the system (qqc2-desktop-style)." + << "The application may look broken."; + return; + } +#endif + + QQuickStyle::setStyle(QStringLiteral("org.kde.desktop")); } QGnomePlatformTheme::~QGnomePlatformTheme() @@ -148,7 +175,7 @@ } } -#if QT_VERSION < 0x060000 +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) #ifndef QT_NO_SYSTEMTRAYICON static bool isDBusTrayAvailable() { @@ -169,7 +196,7 @@ #ifndef QT_NO_SYSTEMTRAYICON QPlatformSystemTrayIcon *QGnomePlatformTheme::createPlatformSystemTrayIcon() const { -#if QT_VERSION < 0x060000 +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) if (isDBusTrayAvailable()) { return new QDBusTrayIcon(); } @@ -182,7 +209,12 @@ } #endif -#if QT_VERSION > 0x060300 +#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) +Qt::ColorScheme QGnomePlatformTheme::colorScheme() const +{ + return GnomeSettings::getInstance().useGtkThemeDarkVariant() ? Qt::ColorScheme::Dark : Qt::ColorScheme::Light; +} +#elif QT_VERSION >= QT_VERSION_CHECK(6, 3, 0) QPlatformTheme::Appearance QGnomePlatformTheme::appearance() const { return GnomeSettings::getInstance().useGtkThemeDarkVariant() ? Appearance::Dark : Appearance::Light; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QGnomePlatform-0.9.0/src/theme/qgnomeplatformtheme.h new/QGnomePlatform-0.9.1/src/theme/qgnomeplatformtheme.h --- old/QGnomePlatform-0.9.0/src/theme/qgnomeplatformtheme.h 2022-09-20 10:48:55.000000000 +0200 +++ new/QGnomePlatform-0.9.1/src/theme/qgnomeplatformtheme.h 2023-05-11 08:44:18.000000000 +0200 @@ -39,12 +39,14 @@ #ifndef QT_NO_SYSTEMTRAYICON QPlatformSystemTrayIcon *createPlatformSystemTrayIcon() const Q_DECL_OVERRIDE; #endif -#if QT_VERSION > 0x060300 +#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0) + Qt::ColorScheme colorScheme() const Q_DECL_OVERRIDE; +#elif QT_VERSION >= QT_VERSION_CHECK(6, 3, 0) QPlatformTheme::Appearance appearance() const Q_DECL_OVERRIDE; #endif private: -#if QT_VERSION > 0x060000 +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) // Used to load Qt's internall platform theme to get access to // non-public stuff, like QDBusTrayIcon QPlatformTheme *m_platformTheme = nullptr; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QGnomePlatform-0.9.0/src/theme/qgtk3dialoghelpers.cpp new/QGnomePlatform-0.9.1/src/theme/qgtk3dialoghelpers.cpp --- old/QGnomePlatform-0.9.0/src/theme/qgtk3dialoghelpers.cpp 2022-09-20 10:48:55.000000000 +0200 +++ new/QGnomePlatform-0.9.1/src/theme/qgtk3dialoghelpers.cpp 2023-05-11 08:44:18.000000000 +0200 @@ -51,7 +51,9 @@ #undef signals #include <gdk/gdk.h> +#ifdef GDK_WINDOWING_X11 #include <gdk/gdkx.h> +#endif #include <gtk/gtk.h> #include <pango/pango.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/QGnomePlatform-0.9.0/src/theme/qxdgdesktopportalfiledialog.cpp new/QGnomePlatform-0.9.1/src/theme/qxdgdesktopportalfiledialog.cpp --- old/QGnomePlatform-0.9.0/src/theme/qxdgdesktopportalfiledialog.cpp 2022-09-20 10:48:55.000000000 +0200 +++ new/QGnomePlatform-0.9.1/src/theme/qxdgdesktopportalfiledialog.cpp 2023-05-11 08:44:18.000000000 +0200 @@ -28,9 +28,9 @@ #include <QDBusPendingReply> #include <QtDBus/QtDBus> -#include <QGuiApplication> #include <QFile> #include <QFileInfo> +#include <QGuiApplication> #include <QMetaType> #include <QMimeDatabase> #include <QMimeType> ++++++ fix-XSetTransientForHint.patch ++++++ --- /var/tmp/diff_new_pack.TM9CoW/_old 2023-05-23 14:55:21.578772894 +0200 +++ /var/tmp/diff_new_pack.TM9CoW/_new 2023-05-23 14:55:21.582772918 +0200 @@ -5,25 +5,26 @@ =================================================================== --- QGnomePlatform-0.9.0.orig/CMakeLists.txt +++ QGnomePlatform-0.9.0/CMakeLists.txt -@@ -94,6 +94,8 @@ if (NOT QT_PLUGINS_DIR) +@@ -106,6 +106,8 @@ endif() endif() - + +find_package(X11 REQUIRED) + add_subdirectory(src) - + feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES) + Index: QGnomePlatform-0.9.0/src/theme/CMakeLists.txt =================================================================== --- QGnomePlatform-0.9.0.orig/src/theme/CMakeLists.txt +++ QGnomePlatform-0.9.0/src/theme/CMakeLists.txt -@@ -18,6 +18,7 @@ target_link_libraries(qgnomeplatformthem - Qt${QT_VERSION_MAJOR}::GuiPrivate +@@ -19,6 +19,7 @@ + Qt${QT_VERSION_MAJOR}::QuickControls2 ${ADWAITAQT_LIBRARIES} PkgConfig::GTK+3 + X11::X11 ) - + if (NOT USE_QT6)
