commit:     d748b106d32ad768e497370d3e6af232cb533ab0
Author:     Jimi Huotari <chiitoo <AT> gentoo <DOT> org>
AuthorDate: Sun Jun  7 17:25:55 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Jun 14 22:48:36 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d748b106

x11-libs/libfm-qt: add version 0.15.1-r1

Backport a change related to lxqt-config appearance changes.

Package-Manager: Portage-2.3.100, Repoman-2.3.22
Signed-off-by: Jimi Huotari <chiitoo <AT> gentoo.org>
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../libfm-qt-0.15.1-update-runtime-colours.patch   | 57 ++++++++++++++++++++++
 x11-libs/libfm-qt/libfm-qt-0.15.1-r1.ebuild        | 49 +++++++++++++++++++
 2 files changed, 106 insertions(+)

diff --git 
a/x11-libs/libfm-qt/files/libfm-qt-0.15.1-update-runtime-colours.patch 
b/x11-libs/libfm-qt/files/libfm-qt-0.15.1-update-runtime-colours.patch
new file mode 100644
index 00000000000..850cd16a05a
--- /dev/null
+++ b/x11-libs/libfm-qt/files/libfm-qt-0.15.1-update-runtime-colours.patch
@@ -0,0 +1,57 @@
+From ecb0face63bfa593ce12caef4285d20cbf7f3f41 Mon Sep 17 00:00:00 2001
+From: Tsu Jan <tsujan2...@gmail.com>
+Date: Mon, 1 Jun 2020 23:33:37 +0430
+Subject: [PATCH] Update text color of places view if style changes in runtime
+
+Otherwise, if the style is switched between dark and light in runtime (which 
will soon be possible in LXQt), the text color will not change and might not 
have enough contrast with its background.
+---
+ src/sidepane.cpp | 14 ++++++++++++++
+ src/sidepane.h   |  3 +++
+ 2 files changed, 17 insertions(+)
+
+diff --git a/src/sidepane.cpp b/src/sidepane.cpp
+index 73e74e7..d45adf9 100644
+--- a/src/sidepane.cpp
++++ b/src/sidepane.cpp
+@@ -19,6 +19,7 @@
+ 
+ 
+ #include "sidepane.h"
++#include <QEvent>
+ #include <QComboBox>
+ #include <QVBoxLayout>
+ #include <QHeaderView>
+@@ -51,6 +52,19 @@ SidePane::~SidePane() {
+     // qDebug("delete SidePane");
+ }
+ 
++bool SidePane::event(QEvent* event) {
++    // when the SidePane's style changes, we should set the text color of
++    // PlacesView to its window text color again because the latter may have 
changed
++    if(event->type() == QEvent::StyleChange && mode_ == ModePlaces) {
++        if(PlacesView* placesView = static_cast<PlacesView*>(view_)) {
++            QPalette p = placesView->palette();
++            p.setColor(QPalette::Text, p.color(QPalette::WindowText));
++            placesView->setPalette(p);
++        }
++    }
++    return QWidget::event(event);
++}
++
+ void SidePane::onComboCurrentIndexChanged(int current) {
+     if(current != mode_) {
+         setMode(Mode(current));
+diff --git a/src/sidepane.h b/src/sidepane.h
+index 7218f6a..79b27a9 100644
+--- a/src/sidepane.h
++++ b/src/sidepane.h
+@@ -111,6 +111,9 @@ class LIBFM_QT_API SidePane : public QWidget {
+ 
+     void hiddenPlaceSet(const QString& str, bool hide);
+ 
++protected:
++    bool event(QEvent* event) override;
++
+ protected Q_SLOTS:
+     void onComboCurrentIndexChanged(int current);
+ 

diff --git a/x11-libs/libfm-qt/libfm-qt-0.15.1-r1.ebuild 
b/x11-libs/libfm-qt/libfm-qt-0.15.1-r1.ebuild
new file mode 100644
index 00000000000..b820cada88e
--- /dev/null
+++ b/x11-libs/libfm-qt/libfm-qt-0.15.1-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit cmake xdg-utils
+
+DESCRIPTION="Qt Library for Building File Managers"
+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="BSD GPL-2+ LGPL-2.1+"
+SLOT="0/7"
+
+BDEPEND="
+       dev-qt/linguist-tools:5
+       >=dev-util/lxqt-build-tools-0.7.0
+       virtual/pkgconfig
+"
+DEPEND="
+       dev-libs/glib:2
+       dev-qt/qtcore:5
+       dev-qt/qtgui:5=
+       dev-qt/qtwidgets:5
+       dev-qt/qtx11extras:5
+       >=lxde-base/menu-cache-1.1.0:=
+       media-libs/libexif
+       x11-libs/libxcb
+"
+RDEPEND="${DEPEND}
+       !lxqt-base/lxqt-l10n
+"
+
+PATCHES=( "${FILESDIR}/${PN}-0.15.1-update-runtime-colours.patch" )
+
+pkg_postinst() {
+       xdg_mimeinfo_database_update
+}
+
+pkg_postrm() {
+       xdg_mimeinfo_database_update
+}

Reply via email to