Compare commits

...

No commits in common. "c8" and "c9" have entirely different histories.
c8 ... c9

6 changed files with 821 additions and 34 deletions

2
.gitignore vendored
View File

@ -1 +1 @@
SOURCES/QGnomePlatform-0.7.1.tar.gz
SOURCES/QGnomePlatform-0.9.0.tar.gz

View File

@ -1 +1 @@
307a105413ef155a5f8d9486b26fc4fd2151bc96 SOURCES/QGnomePlatform-0.7.1.tar.gz
ee61cde7f6a8e1643d8deff1d2f7af56a348ba55 SOURCES/QGnomePlatform-0.9.0.tar.gz

View File

@ -0,0 +1,629 @@
From d9c0210ac45f7de71750655a3ca0d89581d19f88 Mon Sep 17 00:00:00 2001
From: Jan Grulich <jgrulich@redhat.com>
Date: Fri, 10 Mar 2023 11:04:41 +0100
Subject: [PATCH] Add support for KColorScheme using Adwaita-like color schemes
---
src/CMakeLists.txt | 1 +
src/color-schemes/Adwaita.colors | 120 ++++++++++++++
src/color-schemes/AdwaitaDark.colors | 147 ++++++++++++++++++
src/color-schemes/AdwaitaHighcontrast.colors | 120 ++++++++++++++
.../AdwaitaHighcontrastInverse.colors | 147 ++++++++++++++++++
src/color-schemes/CMakeLists.txt | 4 +
src/common/gnomesettings.cpp | 14 ++
7 files changed, 553 insertions(+)
create mode 100644 src/color-schemes/Adwaita.colors
create mode 100644 src/color-schemes/AdwaitaDark.colors
create mode 100644 src/color-schemes/AdwaitaHighcontrast.colors
create mode 100644 src/color-schemes/AdwaitaHighcontrastInverse.colors
create mode 100644 src/color-schemes/CMakeLists.txt
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1823d54..1241d6b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,3 +1,4 @@
+add_subdirectory(color-schemes)
add_subdirectory(common)
if (NOT DISABLE_DECORATION_SUPPORT)
diff --git a/src/color-schemes/Adwaita.colors b/src/color-schemes/Adwaita.colors
new file mode 100644
index 0000000..2161672
--- /dev/null
+++ b/src/color-schemes/Adwaita.colors
@@ -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 --git a/src/color-schemes/AdwaitaDark.colors b/src/color-schemes/AdwaitaDark.colors
new file mode 100644
index 0000000..bc92512
--- /dev/null
+++ b/src/color-schemes/AdwaitaDark.colors
@@ -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 --git a/src/color-schemes/AdwaitaHighcontrast.colors b/src/color-schemes/AdwaitaHighcontrast.colors
new file mode 100644
index 0000000..50f4aa9
--- /dev/null
+++ b/src/color-schemes/AdwaitaHighcontrast.colors
@@ -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 --git a/src/color-schemes/AdwaitaHighcontrastInverse.colors b/src/color-schemes/AdwaitaHighcontrastInverse.colors
new file mode 100644
index 0000000..b665c20
--- /dev/null
+++ b/src/color-schemes/AdwaitaHighcontrastInverse.colors
@@ -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 --git a/src/color-schemes/CMakeLists.txt b/src/color-schemes/CMakeLists.txt
new file mode 100644
index 0000000..e156bfa
--- /dev/null
+++ b/src/color-schemes/CMakeLists.txt
@@ -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 --git a/src/common/gnomesettings.cpp b/src/common/gnomesettings.cpp
index 078b1a9..1be8d61 100644
--- a/src/common/gnomesettings.cpp
+++ b/src/common/gnomesettings.cpp
@@ -256,6 +256,18 @@ GnomeSettings::TitlebarButtonsPlacement GnomeSettings::titlebarButtonPlacement()
return m_hintProvider->titlebarButtonPlacement();
}
+static QString colorScheme(bool useHighContrast, bool useDarkVariant)
+{
+ QString colorScheme = QStringLiteral("/usr/share/color-schemes/");
+ if (useHighContrast) {
+ colorScheme += useDarkVariant ? QStringLiteral("AdwaitaHighcontrastInverse.colors") : QStringLiteral("AdwaitaHighcontrast.colors");
+ } else {
+ colorScheme += useDarkVariant ? QStringLiteral("AdwaitaDark.colors") : QStringLiteral("Adwaita.colors");
+ }
+
+ return colorScheme;
+}
+
void GnomeSettings::loadPalette()
{
if (useGtkThemeHighContrastVariant()) {
@@ -264,6 +276,8 @@ void GnomeSettings::loadPalette()
} else {
m_palette = new QPalette(Adwaita::Colors::palette(useGtkThemeDarkVariant() ? Adwaita::ColorVariant::AdwaitaDark : Adwaita::ColorVariant::Adwaita));
}
+
+ qApp->setProperty("KDE_COLOR_SCHEME_PATH", colorScheme(useGtkThemeHighContrastVariant(), useGtkThemeDarkVariant()));
}
void GnomeSettings::onCursorBlinkTimeChanged()

View File

@ -0,0 +1,11 @@
--- a/src/decoration/qgnomeplatformdecoration.cpp
+++ b/src/decoration/qgnomeplatformdecoration.cpp
@@ -620,7 +620,7 @@ bool QGnomePlatformDecoration::handleTouch(QWaylandInputDevice *inputDevice,
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();

View File

@ -0,0 +1,49 @@
diff --git a/src/decoration/qgnomeplatformdecoration.cpp b/src/decoration/qgnomeplatformdecoration.cpp
index b05a9b4..7f2ae9a 100644
--- a/src/decoration/qgnomeplatformdecoration.cpp
+++ b/src/decoration/qgnomeplatformdecoration.cpp
@@ -182,7 +182,7 @@ QMargins QGnomePlatformDecoration::margins(MarginsType marginsType) const
#else
QMargins QGnomePlatformDecoration::margins() const
{
- if ((window()->windowStates() & Qt::WindowMaximized)) {
+ if ((waylandWindow()->windowStates() & Qt::WindowMaximized)) {
return QMargins(0, TITLEBAR_HEIGHT, 0, 0);
}
@@ -372,7 +372,7 @@ void QGnomePlatformDecoration::paint(QPaintDevice *device)
// * *
// ********************************
QPainterPath borderRect;
- if (!(window()->windowStates() & Qt::WindowMaximized)) {
+ if (!(waylandWindow()->windowStates() & Qt::WindowMaximized)) {
borderRect.addRoundedRect(0, 0, surfaceRect.width(), margins().top() + 8, 10, 10);
p.fillPath(borderRect.simplified(), borderColor);
}
@@ -390,7 +390,7 @@ void QGnomePlatformDecoration::paint(QPaintDevice *device)
// * *
// ********************************
QPainterPath roundedRect;
- if ((window()->windowStates() & Qt::WindowMaximized)) {
+ if ((waylandWindow()->windowStates() & Qt::WindowMaximized)) {
roundedRect.addRect(0, 0, surfaceRect.width(), margins().top() + 8);
} else {
roundedRect
@@ -414,7 +414,7 @@ void QGnomePlatformDecoration::paint(QPaintDevice *device)
// *| |*
// *------------------------------*
// ********************************
- if (!(window()->windowStates() & Qt::WindowMaximized)) {
+ if (!(waylandWindow()->windowStates() & Qt::WindowMaximized)) {
QPainterPath borderPath;
// Left
borderPath.addRect(0, margins().top(), margins().left(), surfaceRect.height() - margins().top() - WINDOW_BORDER_WIDTH);
@@ -499,7 +499,7 @@ void QGnomePlatformDecoration::paint(QPaintDevice *device)
if (GnomeSettings::getInstance().titlebarButtons().testFlag(GnomeSettings::getInstance().MaximizeButton)) {
renderButton(&p,
maximizeButtonRect(),
- (window()->windowStates() & Qt::WindowMaximized) ? Adwaita::ButtonType::ButtonRestore : Adwaita::ButtonType::ButtonMaximize,
+ (waylandWindow()->windowStates() & Qt::WindowMaximized) ? Adwaita::ButtonType::ButtonRestore : Adwaita::ButtonType::ButtonMaximize,
m_maximizeButtonHovered && active,
m_clicking == Button::Maximize || m_clicking == Button::Restore);
}

View File

@ -1,7 +1,7 @@
Name: qgnomeplatform
Version: 0.7.1
Release: 3%{?dist}
Version: 0.9.0
Release: 1%{?dist}
Summary: Qt Platform Theme aimed to accommodate Gnome settings
License: LGPLv2+
@ -9,19 +9,24 @@ URL: https://github.com/MartinBriza/QGnomePlatform
Source0: https://github.com/MartinBriza/QGnomePlatform/archive/%{version}/QGnomePlatform-%{version}.tar.gz
# Upstream patches
Patch0: qgnomeplatform-fix-window-content-geometry-for-qt5-when-shadows-are-enabled.patch
Patch1: qgnomeplatform-add-support-for-kcolorscheme-using-adwaita-like-color-schemes.patch
Patch50: qgnomeplatform-use-more-updated-window-states-value.patch
BuildRequires: make
BuildRequires: pkgconfig(gio-2.0)
BuildRequires: pkgconfig(udev)
BuildRequires: pkgconfig(xkbcommon)
BuildRequires: gtk3-devel
BuildRequires: gsettings-desktop-schemas-devel
BuildRequires: libinput-devel
BuildRequires: libXrender-devel
BuildRequires: qt5-qtbase-devel >= 5.12.0
BuildRequires: qt5-qtbase-static >= 5.12.0
BuildRequires: qt5-qtwayland-devel >= 5.12.0
BuildRequires: libadwaita-qt5-devel >= 1.2.0
BuildRequires: libadwaita-qt5-devel >= 1.3.1
Requires: adwaita-qt5%{?_isa}
BuildRequires: qt5-qtbase-private-devel
@ -38,55 +43,148 @@ modifying them - making them fit into the environment as well as possible.
%build
mkdir %{_target_platform}
pushd %{_target_platform}
%{qmake_qt5} ..
popd
make %{?_smp_mflags} -C %{_target_platform}
%cmake
%cmake_build
%install
make install INSTALL_ROOT=%{buildroot} -C %{_target_platform}
%cmake_install
%files
%doc README.md
%license LICENSE
%{_qt5_libdir}/qt5/plugins/platformthemes/libqgnomeplatform.so
%{_qt5_libdir}/qt5/plugins/wayland-decoration-client/libqgnomeplatformdecoration.so
%{_datadir}/color-schemes/*.colors
%{_qt5_libdir}/libqgnomeplatform.so
%{_qt5_plugindir}/platformthemes/libqgnomeplatformtheme.so
%{_qt5_plugindir}/wayland-decoration-client/libqgnomeplatformdecoration.so
%changelog
* Fri Apr 01 2022 Jan Grulich <jgrulich@redhat.com> - 0.7.1-3
* Tue Apr 18 2023 Jan Grulich <jgrulich@redhat.com> - 0.9.0-1
- 0.9.0
Resolves: bz#2175753
* Fri Apr 01 2022 Jan Grulich <jgrulich@redhat.com> - 0.8.4-2
- Rebuild (Qt 5.15.3)
Resolves: bz#2061415
Resolves: bz#2061413
* Mon Jan 24 2022 Jan Grulich <jgrulich@redhat.com> - 0.8.4-1
- 0.8.4 (sync with Fedora)
Resolves: bz#2041342
* Wed Apr 28 2021 Jan Grulich <jgrulich@redhat.com> - 0.7.1-2
- Rebuild (binutils)
Resolves: bz#1930073
* Mon Aug 23 2021 Jan Grulich <jgrulich@redhat.com> - 0.8.0-1
- 0.8.0
Resolves: bz#1968290
* Thu Apr 08 2021 Jan Grulich <jgrulich@redhat.com> - 0.7.1-1
- 0.7.1
Resolves: bz#1930073
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 0.7.1-2
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Wed Nov 20 2019 Jan Grulich <jgrulich@redhat.com> - 0.4-3
- Rebuild (qt5)
Resolves: bz#1774418
* Mon May 03 2021 Jan Grulich <jgrulich@redhat.com> - 0.7.1-1
- Sync with Fedora - update to 0.7.1
Resolves: bz#1951151
* Mon Dec 10 2018 Jan Grulich <jgrulich@redhat.com> - 0.4-2
- Do not apply scaling twice
Resolves: bz#1657279
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.7.0-4
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Tue Jan 05 2021 Jan Grulich <jgrulich@redhat.com> - 0.7.0-2
- QXdgDesktopFileDialog: backport upstream fixes
* Thu Dec 17 2020 Jan Grulich <jgrulich@redhat.com> - 0.7.0-1
- 0.7.0
* Fri Nov 27 10:56:10 CET 2020 Jan Grulich <jgrulich@redhat.com> - 0.6.90-3
- rebuild (qt5) for eln
* Mon Nov 23 07:54:44 CET 2020 Jan Grulich <jgrulich@redhat.com> - 0.6.90-2
- rebuild (qt5)
* Wed Sep 30 2020 Jan Grulich <jgrulich@redhat.com> - 0.6.90-1
- 0.6.90
* Fri Sep 11 2020 Jan Grulich <jgrulich@redhat.com> - 0.6.1-3
- rebuild (qt5)
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon May 11 2020 Jan Grulich <jgrulich@redhat.com> - 0.6.1-1
- 0.6.1
* Mon Apr 06 2020 Rex Dieter <rdieter@fedoraproject.org> - 0.6.0-4
- rebuild (qt5)
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Dec 09 2019 Jan Grulich <jgrulich@redhat.com> - 0.6.0-2
- rebuild (qt5)
* Wed Nov 20 2019 Jan Grulich <jgrulich@redhat.com> - 0.6.0-1
- Update to 0.6.0
* Fri Oct 04 2019 Jan Grulich <jgrulich@redhat.com> - 0.5.90-1
- Update to 0.5.90
* Thu Oct 03 2019 Jan Grulich <jgrulich@redhat.com> - 0.5-17
- Link decorations against qtx11extras
* Fri Sep 27 2019 Jan Grulich <jgrulich@redhat.com> - 0.5-16
- Set XCURSOR_SIZE only on wayland
* Fri Sep 27 2019 Jan Grulich <jgrulich@redhat.com> - 0.5-15
- Add support for double-click to maximize windows
* Wed Sep 25 2019 Jan Grulich <jgrulich@redhat.com> - 0.5-14
- rebuild (qt5)
* Wed Aug 28 2019 Jan Grulich <jgrulich@redhat.com> - 0.5-13
- Fix cursor size on wayland
* Thu Aug 15 2019 Jan Grulich <jgrulich@redhat.com> - 0.5-12
- Add Gnome-like wayland decorations
BUG: bz#1732129
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Mon Jun 17 2019 Jan Grulich <jgrulich@redhat.com> - 0.5-10
- rebuild (qt5)
* Wed Jun 05 2019 Rex Dieter <rdieter@fedoraproject.org> - 0.5-9
- rebuild (qt5)
* Sun Mar 03 2019 Rex Dieter <rdieter@fedoraproject.org> - 0.5-8
- rebuild (qt5), use %%make_build
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Wed Dec 12 2018 Rex Dieter <rdieter@fedoraproject.org> - 0.5-6
- rebuild (qt5)
* Wed Dec 05 2018 Jan Grulich <jgrulich@redhat.com> - 0.5-1
- Update to 0.5
* Fri Sep 21 2018 Jan Grulich <jgrulich@redhat.com> - 0.4-3
- rebuild (qt5)
* Fri Aug 24 2018 Rex Dieter <rdieter@fedoraproject.org> - 0.4-2
- rebuild
* Tue Jul 24 2018 Jan Grulich <jgrulich@redhat.com> - 0.4-1
- Update to 0.4
* Tue Jul 03 2018 Jan Grulich <jgrulich@redhat.com> - 0.3-11
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.3-12
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Wed Jun 20 2018 Rex Dieter <rdieter@fedoraproject.org> - 0.3-11
- rebuild (qt5)
* Mon May 14 2018 Jan Grulich <jgrulich@redhat.com> - 0.3-10
- Require adwaita-qt instead adwaita-qt5
Resolves: bz#1569052
* Sun May 27 2018 Rex Dieter <rdieter@fedoraproject.org> - 0.3-10
- rebuild (qt5)
* Wed Feb 14 2018 Jan Grulich <jgrulich@redhat.com> - 0.3-9
- rebuild (qt5)