summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJimi Huotari <chiitoo@gentoo.org>2020-06-07 16:03:32 +0300
committerAndreas Sturmlechner <asturm@gentoo.org>2020-06-15 00:48:35 +0200
commit7941fd497e0ac7d4307153d5558db8eb916ec5e2 (patch)
treec17e7f32bb74cdcc926db99a4c72791396bc9fe9 /lxqt-base/lxqt-qtplugin/files
parentlxqt-base/liblxqt: add version 0.15.1 (diff)
downloadgentoo-7941fd497e0ac7d4307153d5558db8eb916ec5e2.tar.gz
gentoo-7941fd497e0ac7d4307153d5558db8eb916ec5e2.tar.bz2
gentoo-7941fd497e0ac7d4307153d5558db8eb916ec5e2.zip
lxqt-base/lxqt-qtplugin: add version 0.15.1
This release includes a workaround for incorrect GUI colours when running with Qt 5.15. Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: Jimi Huotari <chiitoo@gentoo.org> Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'lxqt-base/lxqt-qtplugin/files')
-rw-r--r--lxqt-base/lxqt-qtplugin/files/lxqt-qtplugin-0.15.1-adjust-highlight-colour.patch26
-rw-r--r--lxqt-base/lxqt-qtplugin/files/lxqt-qtplugin-0.15.1-no-widget-reset.patch30
2 files changed, 56 insertions, 0 deletions
diff --git a/lxqt-base/lxqt-qtplugin/files/lxqt-qtplugin-0.15.1-adjust-highlight-colour.patch b/lxqt-base/lxqt-qtplugin/files/lxqt-qtplugin-0.15.1-adjust-highlight-colour.patch
new file mode 100644
index 000000000000..b25b3254173d
--- /dev/null
+++ b/lxqt-base/lxqt-qtplugin/files/lxqt-qtplugin-0.15.1-adjust-highlight-colour.patch
@@ -0,0 +1,26 @@
+From 5858386839d499c032d62c9d10301dc09421de27 Mon Sep 17 00:00:00 2001
+From: Tsu Jan <tsujan2000@gmail.com>
+Date: Mon, 8 Jun 2020 01:49:41 +0430
+Subject: [PATCH] Enforce Fusion's highlight color when setting window color
+
+Because Qt's default highlight color is `#000080` while that of Fusion is `#3c8ce6`. Not only the latter is more elegant but also the patch fixes the color change after restarting apps.
+
+Also, the highlighted text color is set to white for the sake of certainty.
+---
+ src/lxqtplatformtheme.cpp | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/lxqtplatformtheme.cpp b/src/lxqtplatformtheme.cpp
+index 76f6483..3edc5b1 100644
+--- a/src/lxqtplatformtheme.cpp
++++ b/src/lxqtplatformtheme.cpp
+@@ -134,6 +134,9 @@ void LXQtPlatformTheme::loadSettings() {
+ if(LXQtPalette_)
+ delete LXQtPalette_;
+ LXQtPalette_ = new QPalette(winColor_);
++ // Qt's default highlight color and that of Fusion may be different. This is a workaround:
++ LXQtPalette_->setColor(QPalette::Highlight, QColor(60, 140, 230));
++ LXQtPalette_->setColor(QPalette::HighlightedText, QColor(255, 255, 255));
+ }
+
+ // SystemFont
diff --git a/lxqt-base/lxqt-qtplugin/files/lxqt-qtplugin-0.15.1-no-widget-reset.patch b/lxqt-base/lxqt-qtplugin/files/lxqt-qtplugin-0.15.1-no-widget-reset.patch
new file mode 100644
index 000000000000..85258c851f74
--- /dev/null
+++ b/lxqt-base/lxqt-qtplugin/files/lxqt-qtplugin-0.15.1-no-widget-reset.patch
@@ -0,0 +1,30 @@
+From 8cc32d94b4c9de74b5bcf27fae2d10e6b2b11caf Mon Sep 17 00:00:00 2001
+From: Tsu Jan <tsujan2000@gmail.com>
+Date: Mon, 1 Jun 2020 22:20:22 +0430
+Subject: [PATCH] Do not reset widget palettes on changing style
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Generally, resetting a widget's palette from outside its code is a bad practice because the palette may have been changed for a reason.
+
+If the custom palette of a widget needs an update when the style changes, the program itself is responsible for that; otherwise, the program has a bug — as in libfm-qt's places view (which I'll fix soon) and Dolphin's main view (which will never be fixed).
+---
+ src/lxqtplatformtheme.cpp | 4 ----
+ 1 file changed, 4 deletions(-)
+
+diff --git a/src/lxqtplatformtheme.cpp b/src/lxqtplatformtheme.cpp
+index 2df9f8f..76f6483 100644
+--- a/src/lxqtplatformtheme.cpp
++++ b/src/lxqtplatformtheme.cpp
+@@ -234,10 +234,6 @@ void LXQtPlatformTheme::onSettingsChanged() {
+ // Qt5 added a QEvent::ThemeChange event.
+ QEvent event(QEvent::ThemeChange);
+ QApplication::sendEvent(widget, &event);
+- // Also, set the palette because it may not be updated for some widgets.
+- // WARNING: The app palette should be used, not LXQtPalette_, because
+- // some widget styles have their own palettes.
+- widget->setPalette(QApplication::palette());
+ }
+ }
+