1 |
commit: cffb8d30918d2a9ee78eb63e0cc2603a0feb06c6 |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jun 29 19:32:46 2022 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jun 29 19:53:16 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cffb8d30 |
7 |
|
8 |
kde-frameworks/plasma: Units: Fix sizeForLabels double-scaling icons |
9 |
|
10 |
...with Plasma scaling. |
11 |
|
12 |
Upstream commit 26ae86dff198fbce05ba3824b89786224b3792a9 |
13 |
KDE-bug: https://bugs.kde.org/show_bug.cgi?id=454131 |
14 |
|
15 |
Package-Manager: Portage-3.0.30, Repoman-3.0.3 |
16 |
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org> |
17 |
|
18 |
...a-5.95.0-fix-sizeForLabels-double-scaling.patch | 38 +++++++++++ |
19 |
kde-frameworks/plasma/plasma-5.95.0-r4.ebuild | 78 ++++++++++++++++++++++ |
20 |
2 files changed, 116 insertions(+) |
21 |
|
22 |
diff --git a/kde-frameworks/plasma/files/plasma-5.95.0-fix-sizeForLabels-double-scaling.patch b/kde-frameworks/plasma/files/plasma-5.95.0-fix-sizeForLabels-double-scaling.patch |
23 |
new file mode 100644 |
24 |
index 000000000000..84022d815b55 |
25 |
--- /dev/null |
26 |
+++ b/kde-frameworks/plasma/files/plasma-5.95.0-fix-sizeForLabels-double-scaling.patch |
27 |
@@ -0,0 +1,38 @@ |
28 |
+From 26ae86dff198fbce05ba3824b89786224b3792a9 Mon Sep 17 00:00:00 2001 |
29 |
+From: Nate Graham <nate@×××.org> |
30 |
+Date: Thu, 23 Jun 2022 12:47:32 -0600 |
31 |
+Subject: [PATCH] Units: Fix sizeForLabels double-scaling icons with Plasma |
32 |
+ scaling |
33 |
+ |
34 |
+The sizeForLabels unit internally uses roundToIconSize(), giving it a |
35 |
+value and feeding that into devicePixelIconSize() to take into account |
36 |
+required icons size differences when using Plasma scaling. But |
37 |
+roundToIconSize() internally does that automatically! So as a result, |
38 |
+the size is double-scaled and looks too big. To fix this, we simply have |
39 |
+to stop using devicePixelIconSize() for this unit. |
40 |
+ |
41 |
+BUG: 454131 |
42 |
+FIXED-IN: 5.96 |
43 |
+--- |
44 |
+ src/declarativeimports/core/units.cpp | 5 +++-- |
45 |
+ 1 file changed, 3 insertions(+), 2 deletions(-) |
46 |
+ |
47 |
+diff --git a/src/declarativeimports/core/units.cpp b/src/declarativeimports/core/units.cpp |
48 |
+index 0cdffcbfd..8d655d11f 100644 |
49 |
+--- a/src/declarativeimports/core/units.cpp |
50 |
++++ b/src/declarativeimports/core/units.cpp |
51 |
+@@ -115,8 +115,9 @@ void Units::iconLoaderSettingsChanged() |
52 |
+ m_iconSizes->insert(QStringLiteral("large"), devicePixelIconSize(KIconLoader::SizeLarge)); |
53 |
+ m_iconSizes->insert(QStringLiteral("huge"), devicePixelIconSize(KIconLoader::SizeHuge)); |
54 |
+ m_iconSizes->insert(QStringLiteral("enormous"), devicePixelIconSize(KIconLoader::SizeEnormous)); |
55 |
+- // gridUnit is always the font height here |
56 |
+- m_iconSizes->insert(QStringLiteral("sizeForLabels"), devicePixelIconSize(roundToIconSize(QFontMetrics(QGuiApplication::font()).height()))); |
57 |
++ // We deliberately don't feed the result into devicePixelIconSize() because |
58 |
++ // roundToIconSize() already does that internally. |
59 |
++ m_iconSizes->insert(QStringLiteral("sizeForLabels"), roundToIconSize(QFontMetrics(QGuiApplication::font()).height())); |
60 |
+ |
61 |
+ m_iconSizeHints->insert(QStringLiteral("panel"), devicePixelIconSize(KIconLoader::global()->currentSize(KIconLoader::Panel))); |
62 |
+ m_iconSizeHints->insert(QStringLiteral("desktop"), devicePixelIconSize(KIconLoader::global()->currentSize(KIconLoader::Desktop))); |
63 |
+-- |
64 |
+GitLab |
65 |
+ |
66 |
|
67 |
diff --git a/kde-frameworks/plasma/plasma-5.95.0-r4.ebuild b/kde-frameworks/plasma/plasma-5.95.0-r4.ebuild |
68 |
new file mode 100644 |
69 |
index 000000000000..0eede884b46f |
70 |
--- /dev/null |
71 |
+++ b/kde-frameworks/plasma/plasma-5.95.0-r4.ebuild |
72 |
@@ -0,0 +1,78 @@ |
73 |
+# Copyright 1999-2022 Gentoo Authors |
74 |
+# Distributed under the terms of the GNU General Public License v2 |
75 |
+ |
76 |
+EAPI=8 |
77 |
+ |
78 |
+KDE_ORG_NAME="${PN}-framework" |
79 |
+PVCUT=$(ver_cut 1-2) |
80 |
+QTMIN=5.15.3 |
81 |
+VIRTUALX_REQUIRED="test" |
82 |
+inherit ecm kde.org |
83 |
+ |
84 |
+DESCRIPTION="Plasma framework" |
85 |
+ |
86 |
+LICENSE="LGPL-2+" |
87 |
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86" |
88 |
+IUSE="gles2-only man wayland X" |
89 |
+ |
90 |
+RESTRICT="test" |
91 |
+ |
92 |
+RDEPEND=" |
93 |
+ >=dev-qt/qtdbus-${QTMIN}:5 |
94 |
+ >=dev-qt/qtdeclarative-${QTMIN}:5 |
95 |
+ >=dev-qt/qtgui-${QTMIN}:5[gles2-only=,X=] |
96 |
+ >=dev-qt/qtquickcontrols-${QTMIN}:5 |
97 |
+ >=dev-qt/qtsql-${QTMIN}:5 |
98 |
+ >=dev-qt/qtsvg-${QTMIN}:5 |
99 |
+ >=dev-qt/qtwidgets-${QTMIN}:5 |
100 |
+ =kde-frameworks/kactivities-${PVCUT}*:5 |
101 |
+ =kde-frameworks/karchive-${PVCUT}*:5 |
102 |
+ =kde-frameworks/kconfig-${PVCUT}*:5[qml] |
103 |
+ =kde-frameworks/kconfigwidgets-${PVCUT}*:5 |
104 |
+ =kde-frameworks/kcoreaddons-${PVCUT}*:5 |
105 |
+ =kde-frameworks/kdeclarative-${PVCUT}*:5 |
106 |
+ =kde-frameworks/kglobalaccel-${PVCUT}*:5 |
107 |
+ =kde-frameworks/kguiaddons-${PVCUT}*:5 |
108 |
+ =kde-frameworks/ki18n-${PVCUT}*:5 |
109 |
+ =kde-frameworks/kiconthemes-${PVCUT}*:5 |
110 |
+ =kde-frameworks/kio-${PVCUT}*:5 |
111 |
+ =kde-frameworks/kirigami-${PVCUT}*:5 |
112 |
+ =kde-frameworks/knotifications-${PVCUT}*:5 |
113 |
+ =kde-frameworks/kpackage-${PVCUT}*:5 |
114 |
+ =kde-frameworks/kservice-${PVCUT}*:5 |
115 |
+ =kde-frameworks/kwidgetsaddons-${PVCUT}*:5 |
116 |
+ =kde-frameworks/kwindowsystem-${PVCUT}*:5 |
117 |
+ =kde-frameworks/kxmlgui-${PVCUT}*:5 |
118 |
+ !gles2-only? ( media-libs/libglvnd[X?] ) |
119 |
+ wayland? ( |
120 |
+ =kde-frameworks/kwayland-${PVCUT}*:5 |
121 |
+ media-libs/libglvnd |
122 |
+ ) |
123 |
+ X? ( |
124 |
+ >=dev-qt/qtx11extras-${QTMIN}:5 |
125 |
+ x11-libs/libX11 |
126 |
+ x11-libs/libxcb |
127 |
+ ) |
128 |
+" |
129 |
+DEPEND="${RDEPEND} |
130 |
+ X? ( x11-base/xorg-proto ) |
131 |
+" |
132 |
+BDEPEND="man? ( >=kde-frameworks/kdoctools-${PVCUT}:5 )" |
133 |
+ |
134 |
+PATCHES=( |
135 |
+ "${FILESDIR}/${P}-revert-QT_FEATURE_foo.patch" |
136 |
+ "${FILESDIR}/${P}-fix-sizeForLabels-double-scaling.patch" |
137 |
+) |
138 |
+ |
139 |
+src_configure() { |
140 |
+ local mycmakeargs=( |
141 |
+ $(cmake_use_find_package !gles2-only OpenGL) |
142 |
+ $(cmake_use_find_package man KF5DocTools) |
143 |
+ $(cmake_use_find_package wayland EGL) |
144 |
+ $(cmake_use_find_package wayland KF5Wayland) |
145 |
+ $(cmake_use_find_package X X11) |
146 |
+ $(cmake_use_find_package X XCB) |
147 |
+ ) |
148 |
+ |
149 |
+ ecm_src_configure |
150 |
+} |