commit:     5c63907316d26abc7a8e5e7eafb8688bc4f34ac7
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Apr  9 22:05:05 2023 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Apr  9 22:34:21 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5c639073

kde-plasma/kscreen: kcm: notify global scale changes in kcmfonts

KDE-bug: https://bugs.kde.org/show_bug.cgi?id=468203

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ...-notify-changes-when-global-scale-changes.patch | 37 ++++++++++++++++
 kde-plasma/kscreen/kscreen-5.27.4-r1.ebuild        | 51 ++++++++++++++++++++++
 2 files changed, 88 insertions(+)

diff --git 
a/kde-plasma/kscreen/files/kscreen-5.27.4-kcm-notify-changes-when-global-scale-changes.patch
 
b/kde-plasma/kscreen/files/kscreen-5.27.4-kcm-notify-changes-when-global-scale-changes.patch
new file mode 100644
index 000000000000..9c1e862ff480
--- /dev/null
+++ 
b/kde-plasma/kscreen/files/kscreen-5.27.4-kcm-notify-changes-when-global-scale-changes.patch
@@ -0,0 +1,37 @@
+From e9384150d8e41dd9c869f5f502e02c70a5c6f002 Mon Sep 17 00:00:00 2001
+From: Fushan Wen <qydwhotm...@gmail.com>
+Date: Sat, 8 Apr 2023 00:33:24 +0800
+Subject: [PATCH] kcm: notify changes in kcmfonts when global scale changes
+
+Otherwise kde-gtk-config will use the old font DPI value.
+
+CCBUG: 468203
+---
+ kcm/kcm.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/kcm/kcm.cpp b/kcm/kcm.cpp
+index 6d96625d..f292699c 100644
+--- a/kcm/kcm.cpp
++++ b/kcm/kcm.cpp
+@@ -438,7 +438,7 @@ void KCMKScreen::exportGlobalScale()
+                 loadProc.waitForFinished();
+             }
+         }
+-        fontConfigGroup.writeEntry("forceFontDPI", 0);
++        fontConfigGroup.writeEntry("forceFontDPI", 0, KConfig::Notify);
+     } else {
+         const int scaleDpi = qRound(globalScale() * 96.0);
+         QProcess proc;
+@@ -448,7 +448,7 @@ void KCMKScreen::exportGlobalScale()
+             proc.closeWriteChannel();
+             proc.waitForFinished();
+         }
+-        fontConfigGroup.writeEntry("forceFontDPI", scaleDpi);
++        fontConfigGroup.writeEntry("forceFontDPI", scaleDpi, KConfig::Notify);
+     }
+ 
+     Q_EMIT globalScaleWritten();
+-- 
+GitLab
+

diff --git a/kde-plasma/kscreen/kscreen-5.27.4-r1.ebuild 
b/kde-plasma/kscreen/kscreen-5.27.4-r1.ebuild
new file mode 100644
index 000000000000..efbf3dea06d4
--- /dev/null
+++ b/kde-plasma/kscreen/kscreen-5.27.4-r1.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+ECM_TEST="forceoptional"
+KFMIN=5.102.0
+PVCUT=$(ver_cut 1-3)
+QTMIN=5.15.7
+inherit ecm plasma.kde.org
+
+DESCRIPTION="KDE Plasma screen management"
+HOMEPAGE="https://invent.kde.org/plasma/kscreen";
+
+LICENSE="GPL-2" # TODO: CHECK
+SLOT="5"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE=""
+
+# bug #580440, last checked 5.6.3
+RESTRICT="test"
+
+DEPEND="
+       >=dev-qt/qtdbus-${QTMIN}:5
+       >=dev-qt/qtdeclarative-${QTMIN}:5[widgets]
+       >=dev-qt/qtgui-${QTMIN}:5
+       >=dev-qt/qtsensors-${QTMIN}:5
+       >=dev-qt/qtwidgets-${QTMIN}:5
+       >=kde-frameworks/kcmutils-${KFMIN}:5
+       >=kde-frameworks/kconfig-${KFMIN}:5
+       >=kde-frameworks/kconfigwidgets-${KFMIN}:5
+       >=kde-frameworks/kcoreaddons-${KFMIN}:5
+       >=kde-frameworks/kdeclarative-${KFMIN}:5
+       >=kde-frameworks/kdbusaddons-${KFMIN}:5
+       >=kde-frameworks/kglobalaccel-${KFMIN}:5
+       >=kde-frameworks/ki18n-${KFMIN}:5
+       >=kde-frameworks/kiconthemes-${KFMIN}:5
+       >=kde-frameworks/kwidgetsaddons-${KFMIN}:5
+       >=kde-frameworks/kxmlgui-${KFMIN}:5
+       >=kde-frameworks/plasma-${KFMIN}:5
+       >=kde-plasma/layer-shell-qt-${PVCUT}:5
+       >=kde-plasma/libkscreen-${PVCUT}:5
+       x11-libs/libX11
+"
+RDEPEND="${DEPEND}
+       >=dev-qt/qtgraphicaleffects-${QTMIN}:5
+       >=kde-plasma/kde-cli-tools-${PVCUT}:5
+"
+BDEPEND=">=kde-frameworks/kcmutils-${KFMIN}:5"
+
+PATCHES=( 
"${FILESDIR}/${P}-kcm-notify-changes-when-global-scale-changes.patch" ) # 
KDE-bug 468203

Reply via email to