Skip to content

Commit

Permalink
lxqt-base/lxqt-qtplugin: add version 0.15.1
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Andreas Sturmlechner <[email protected]>
  • Loading branch information
Chiitoo authored and a17r committed Jun 14, 2020
1 parent 1ff9616 commit 7941fd4
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 0 deletions.
1 change: 1 addition & 0 deletions lxqt-base/lxqt-qtplugin/Manifest
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
DIST lxqt-qtplugin-0.14.0.tar.xz 22336 BLAKE2B 8155722880cff279aa26676ed425a011b2259ba94bf92122c59643a0ac6dd89b2841bcbeeac26ac24ef1e351dcdbcabf339c4a2bcee2dac30f2f9298434f7294 SHA512 33188bc03ee48a9b6e3cc5823cdcb5c96dba0cda65da511fe603d952c5de24e292cb02208cf357b04718df90f98d53bf48eaf6793d70d043214e429f57ccf53c
DIST lxqt-qtplugin-0.15.0.tar.xz 22776 BLAKE2B 642270939ddaf9884da611d800c6ccae518a2c259e2da37c3e0025e24a6a11bae1d21cc9d4141821dfcf2e6e4c9b383e800dc68ff9d5f9b39f2e27e121d158c7 SHA512 9a73b9d38e1c2e2e030b551f92d53afef69fedee8f0ff4c7147680c0037a3eacb98f5514e09f16762c03cdaded7e5f760a89d66461bab4d7e8877ebaba28160e
DIST lxqt-qtplugin-0.15.1.tar.xz 23100 BLAKE2B 91f6a90f435a33fd19863f9989b0603590c51f5921ad0837c025437b6fbd50105c70a47028137562af1deb6892fadea05ca3924eee8e2ba8b91a41069ad2ca47 SHA512 6fc19cf5f763d7879e5a052c5638b5b396f659f4e199493c8b87cdb661c910921ecda865de2900a047c96dd63c3ef6dbfa486d1dbe0257c26984a25a139dce2f
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 5858386839d499c032d62c9d10301dc09421de27 Mon Sep 17 00:00:00 2001
From: Tsu Jan <[email protected]>
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
From 8cc32d94b4c9de74b5bcf27fae2d10e6b2b11caf Mon Sep 17 00:00:00 2001
From: Tsu Jan <[email protected]>
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());
}
}

41 changes: 41 additions & 0 deletions lxqt-base/lxqt-qtplugin/lxqt-qtplugin-0.15.1.ebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit cmake

DESCRIPTION="LXQt system integration plugin for Qt"
HOMEPAGE="https://lxqt.github.io/"

if [[ ${PV} = *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/lxqt/${PN}.git"
else
SRC_URI="https://github.com/lxqt/${PN}/releases/download/${PV}/${P}.tar.xz"
KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
fi

LICENSE="LGPL-2.1+"
SLOT="0"

BDEPEND="
dev-qt/linguist-tools:5
>=dev-util/lxqt-build-tools-0.7.0
"
DEPEND="
dev-libs/libdbusmenu-qt:=[qt5(+)]
>=dev-libs/libqtxdg-3.5.0
dev-qt/qtcore:5
dev-qt/qtdbus:5
dev-qt/qtgui:5=
dev-qt/qtwidgets:5
dev-qt/qtx11extras:5
=x11-libs/libfm-qt-$(ver_cut 1-2)*
"
RDEPEND="${DEPEND}"

PATCHES=(
"${FILESDIR}/${PN}-0.15.1-no-widget-reset.patch" # Fixed in next release.
"${FILESDIR}/${PN}-0.15.1-adjust-highlight-colour.patch" # Fixed in next release.
)

0 comments on commit 7941fd4

Please sign in to comment.