commit:     5feba2df29bcc25473f2a7b3b18f3256fee190ad
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 12 21:50:00 2020 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Feb 12 23:10:47 2020 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=5feba2df

kde-apps/konsole: ColorScheme: Fix DarkBackground Detection

See also: https://invent.kde.org/kde/konsole/merge_requests/65
KDE-Bug: https://bugs.kde.org/show_bug.cgi?id=416638
Thanks-to: Manuel RĂ¼ger <mrueg <AT> gentoo.org>
Package-Manager: Portage-2.3.88, Repoman-2.3.20
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../konsole-19.12.2-darkbackground-detect.patch    | 27 ++++++++++++++++++++++
 kde-apps/konsole/konsole-19.12.49.9999.ebuild      |  2 ++
 2 files changed, 29 insertions(+)

diff --git a/kde-apps/konsole/files/konsole-19.12.2-darkbackground-detect.patch 
b/kde-apps/konsole/files/konsole-19.12.2-darkbackground-detect.patch
new file mode 100644
index 0000000000..990bad142c
--- /dev/null
+++ b/kde-apps/konsole/files/konsole-19.12.2-darkbackground-detect.patch
@@ -0,0 +1,27 @@
+From e5b2ada1a6f06e0eea76af1f26ff4c0c4aad8497 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Manuel=20R=C3=BCger?= <[email protected]>
+Date: Thu, 23 Jan 2020 11:00:06 +0100
+Subject: ColorScheme: Fix DarkBackground Detection
+
+Luminance is a value between 0 and 100.
+
+https://bugs.kde.org/show_bug.cgi?id=416638
+---
+ src/ColorScheme.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/ColorScheme.cpp b/src/ColorScheme.cpp
+index 1693c22..5d6b408 100644
+--- a/src/ColorScheme.cpp
++++ b/src/ColorScheme.cpp
+@@ -403,7 +403,7 @@ bool ColorScheme::hasDarkBackground() const
+     const double g = backgroundColor().greenF();
+     const double b = backgroundColor().blueF();
+     rgb2hsluv(r, g, b, &h, &s, &l);
+-    return l < 0.5;
++    return l < 50;
+ }
+ 
+ void ColorScheme::setOpacity(qreal opacity)
+-- 
+cgit v1.1

diff --git a/kde-apps/konsole/konsole-19.12.49.9999.ebuild 
b/kde-apps/konsole/konsole-19.12.49.9999.ebuild
index c4c1bb90b5..8c4abf3812 100644
--- a/kde-apps/konsole/konsole-19.12.49.9999.ebuild
+++ b/kde-apps/konsole/konsole-19.12.49.9999.ebuild
@@ -53,6 +53,8 @@ DEPEND="
 "
 RDEPEND="${DEPEND}"
 
+PATCHES=( "${FILESDIR}/${PN}-19.12.2-darkbackground-detect.patch" )
+
 src_configure() {
        local mycmakeargs=(
                $(cmake_use_find_package X X11)

Reply via email to