commit:     d848b9364fc50423708e15e081042702399c1bb8
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  4 12:59:30 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Apr  4 13:19:41 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d848b936

kde-frameworks/ktexteditor: Fix mini-map location highlighting

Upstream commit bdd195792b7752e4c5a0ff74cb5b01a6accee517

KDE-bug: https://bugs.kde.org/show_bug.cgi?id=434690
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...-5.80.0-fix-minimap-location-highlighting.patch | 35 ++++++++++++
 .../ktexteditor/ktexteditor-5.80.0-r1.ebuild       | 63 ++++++++++++++++++++++
 2 files changed, 98 insertions(+)

diff --git 
a/kde-frameworks/ktexteditor/files/ktexteditor-5.80.0-fix-minimap-location-highlighting.patch
 
b/kde-frameworks/ktexteditor/files/ktexteditor-5.80.0-fix-minimap-location-highlighting.patch
new file mode 100644
index 00000000000..ffc94e9c97a
--- /dev/null
+++ 
b/kde-frameworks/ktexteditor/files/ktexteditor-5.80.0-fix-minimap-location-highlighting.patch
@@ -0,0 +1,35 @@
+From bdd195792b7752e4c5a0ff74cb5b01a6accee517 Mon Sep 17 00:00:00 2001
+From: Jan Paul Batrina <jpmbatrin...@gmail.com>
+Date: Thu, 25 Mar 2021 19:31:39 +0800
+Subject: [PATCH] Use QPalette::highlight for the scrollbar minimap slider
+
+Previously, QPalette::link() was used which is the color for hyperlinks.
+Most themes set this to a shade of blue, so the slider will almost
+always be blue even when, for example, the main color
+of a theme is green.
+
+The selection highlight color was chosen because it is also the color
+used for indicating the active tab and is, generally, often attuned
+to a theme's main color.
+
+BUG: 434690
+---
+ src/view/kateviewhelpers.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/view/kateviewhelpers.cpp b/src/view/kateviewhelpers.cpp
+index 365e07e0..48e94609 100644
+--- a/src/view/kateviewhelpers.cpp
++++ b/src/view/kateviewhelpers.cpp
+@@ -750,7 +750,7 @@ void KateScrollBar::miniMapPaintEvent(QPaintEvent *e)
+     // calculate colors
+     const QColor backgroundColor = 
m_view->defaultStyleAttribute(KTextEditor::dsNormal)->background().color();
+     const QColor foregroundColor = 
m_view->defaultStyleAttribute(KTextEditor::dsNormal)->foreground().color();
+-    const QColor highlightColor = palette().link().color();
++    const QColor highlightColor = palette().highlight().color();
+ 
+     const int backgroundLightness = backgroundColor.lightness();
+     const int foregroundLightness = foregroundColor.lightness();
+-- 
+GitLab
+

diff --git a/kde-frameworks/ktexteditor/ktexteditor-5.80.0-r1.ebuild 
b/kde-frameworks/ktexteditor/ktexteditor-5.80.0-r1.ebuild
new file mode 100644
index 00000000000..da29d0a8c42
--- /dev/null
+++ b/kde-frameworks/ktexteditor/ktexteditor-5.80.0-r1.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PVCUT=$(ver_cut 1-2)
+QTMIN=5.15.2
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org
+
+DESCRIPTION="Framework providing a full text editor component"
+
+LICENSE="LGPL-2+"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc64 ~x86"
+IUSE="+editorconfig git"
+
+RESTRICT+=" test"
+
+BDEPEND="
+       test? ( >=kde-frameworks/kservice-${PVCUT}:5 )
+"
+DEPEND="
+       >=dev-qt/qtdeclarative-${QTMIN}:5
+       >=dev-qt/qtgui-${QTMIN}:5
+       >=dev-qt/qtprintsupport-${QTMIN}:5
+       >=dev-qt/qtwidgets-${QTMIN}:5
+       >=dev-qt/qtxml-${QTMIN}:5
+       =kde-frameworks/karchive-${PVCUT}*:5
+       =kde-frameworks/kauth-${PVCUT}*:5
+       =kde-frameworks/kcodecs-${PVCUT}*:5
+       =kde-frameworks/kcompletion-${PVCUT}*:5
+       =kde-frameworks/kconfig-${PVCUT}*:5
+       =kde-frameworks/kconfigwidgets-${PVCUT}*:5
+       =kde-frameworks/kcoreaddons-${PVCUT}*:5
+       =kde-frameworks/kguiaddons-${PVCUT}*:5
+       =kde-frameworks/ki18n-${PVCUT}*:5
+       =kde-frameworks/kiconthemes-${PVCUT}*:5
+       =kde-frameworks/kio-${PVCUT}*:5
+       =kde-frameworks/kitemviews-${PVCUT}*:5
+       =kde-frameworks/kjobwidgets-${PVCUT}*:5
+       =kde-frameworks/kparts-${PVCUT}*:5
+       =kde-frameworks/ktextwidgets-${PVCUT}*:5
+       =kde-frameworks/kwidgetsaddons-${PVCUT}*:5
+       =kde-frameworks/kxmlgui-${PVCUT}*:5
+       =kde-frameworks/sonnet-${PVCUT}*:5
+       =kde-frameworks/syntax-highlighting-${PVCUT}*:5
+       editorconfig? ( app-text/editorconfig-core-c )
+       git? ( dev-libs/libgit2:= )
+"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-fix-minimap-location-highlighting.patch # KDE-bug 
434690
+)
+
+src_configure() {
+       local mycmakeargs=(
+               $(cmake_use_find_package editorconfig EditorConfig)
+               $(cmake_use_find_package git LibGit2)
+       )
+
+       ecm_src_configure
+}

Reply via email to