summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2022-06-29 21:32:46 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2022-06-29 21:53:16 +0200
commitcffb8d30918d2a9ee78eb63e0cc2603a0feb06c6 (patch)
tree8e6c34b2760d9f0f0ee4c6b9df6d82f5af02ea87
parentapp-emacs/inf-clojure: new package; add version 3.1.0 (diff)
downloadgentoo-cffb8d30.tar.gz
gentoo-cffb8d30.tar.bz2
gentoo-cffb8d30.zip
kde-frameworks/plasma: Units: Fix sizeForLabels double-scaling icons
...with Plasma scaling. Upstream commit 26ae86dff198fbce05ba3824b89786224b3792a9 KDE-bug: https://bugs.kde.org/show_bug.cgi?id=454131 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
-rw-r--r--kde-frameworks/plasma/files/plasma-5.95.0-fix-sizeForLabels-double-scaling.patch38
-rw-r--r--kde-frameworks/plasma/plasma-5.95.0-r4.ebuild78
2 files changed, 116 insertions, 0 deletions
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
new file mode 100644
index 000000000000..84022d815b55
--- /dev/null
+++ b/kde-frameworks/plasma/files/plasma-5.95.0-fix-sizeForLabels-double-scaling.patch
@@ -0,0 +1,38 @@
+From 26ae86dff198fbce05ba3824b89786224b3792a9 Mon Sep 17 00:00:00 2001
+From: Nate Graham <nate@kde.org>
+Date: Thu, 23 Jun 2022 12:47:32 -0600
+Subject: [PATCH] Units: Fix sizeForLabels double-scaling icons with Plasma
+ scaling
+
+The sizeForLabels unit internally uses roundToIconSize(), giving it a
+value and feeding that into devicePixelIconSize() to take into account
+required icons size differences when using Plasma scaling. But
+roundToIconSize() internally does that automatically! So as a result,
+the size is double-scaled and looks too big. To fix this, we simply have
+to stop using devicePixelIconSize() for this unit.
+
+BUG: 454131
+FIXED-IN: 5.96
+---
+ src/declarativeimports/core/units.cpp | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/src/declarativeimports/core/units.cpp b/src/declarativeimports/core/units.cpp
+index 0cdffcbfd..8d655d11f 100644
+--- a/src/declarativeimports/core/units.cpp
++++ b/src/declarativeimports/core/units.cpp
+@@ -115,8 +115,9 @@ void Units::iconLoaderSettingsChanged()
+ m_iconSizes->insert(QStringLiteral("large"), devicePixelIconSize(KIconLoader::SizeLarge));
+ m_iconSizes->insert(QStringLiteral("huge"), devicePixelIconSize(KIconLoader::SizeHuge));
+ m_iconSizes->insert(QStringLiteral("enormous"), devicePixelIconSize(KIconLoader::SizeEnormous));
+- // gridUnit is always the font height here
+- m_iconSizes->insert(QStringLiteral("sizeForLabels"), devicePixelIconSize(roundToIconSize(QFontMetrics(QGuiApplication::font()).height())));
++ // We deliberately don't feed the result into devicePixelIconSize() because
++ // roundToIconSize() already does that internally.
++ m_iconSizes->insert(QStringLiteral("sizeForLabels"), roundToIconSize(QFontMetrics(QGuiApplication::font()).height()));
+
+ m_iconSizeHints->insert(QStringLiteral("panel"), devicePixelIconSize(KIconLoader::global()->currentSize(KIconLoader::Panel)));
+ m_iconSizeHints->insert(QStringLiteral("desktop"), devicePixelIconSize(KIconLoader::global()->currentSize(KIconLoader::Desktop)));
+--
+GitLab
+
diff --git a/kde-frameworks/plasma/plasma-5.95.0-r4.ebuild b/kde-frameworks/plasma/plasma-5.95.0-r4.ebuild
new file mode 100644
index 000000000000..0eede884b46f
--- /dev/null
+++ b/kde-frameworks/plasma/plasma-5.95.0-r4.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+KDE_ORG_NAME="${PN}-framework"
+PVCUT=$(ver_cut 1-2)
+QTMIN=5.15.3
+VIRTUALX_REQUIRED="test"
+inherit ecm kde.org
+
+DESCRIPTION="Plasma framework"
+
+LICENSE="LGPL-2+"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc64 ~riscv ~x86"
+IUSE="gles2-only man wayland X"
+
+RESTRICT="test"
+
+RDEPEND="
+ >=dev-qt/qtdbus-${QTMIN}:5
+ >=dev-qt/qtdeclarative-${QTMIN}:5
+ >=dev-qt/qtgui-${QTMIN}:5[gles2-only=,X=]
+ >=dev-qt/qtquickcontrols-${QTMIN}:5
+ >=dev-qt/qtsql-${QTMIN}:5
+ >=dev-qt/qtsvg-${QTMIN}:5
+ >=dev-qt/qtwidgets-${QTMIN}:5
+ =kde-frameworks/kactivities-${PVCUT}*:5
+ =kde-frameworks/karchive-${PVCUT}*:5
+ =kde-frameworks/kconfig-${PVCUT}*:5[qml]
+ =kde-frameworks/kconfigwidgets-${PVCUT}*:5
+ =kde-frameworks/kcoreaddons-${PVCUT}*:5
+ =kde-frameworks/kdeclarative-${PVCUT}*:5
+ =kde-frameworks/kglobalaccel-${PVCUT}*:5
+ =kde-frameworks/kguiaddons-${PVCUT}*:5
+ =kde-frameworks/ki18n-${PVCUT}*:5
+ =kde-frameworks/kiconthemes-${PVCUT}*:5
+ =kde-frameworks/kio-${PVCUT}*:5
+ =kde-frameworks/kirigami-${PVCUT}*:5
+ =kde-frameworks/knotifications-${PVCUT}*:5
+ =kde-frameworks/kpackage-${PVCUT}*:5
+ =kde-frameworks/kservice-${PVCUT}*:5
+ =kde-frameworks/kwidgetsaddons-${PVCUT}*:5
+ =kde-frameworks/kwindowsystem-${PVCUT}*:5
+ =kde-frameworks/kxmlgui-${PVCUT}*:5
+ !gles2-only? ( media-libs/libglvnd[X?] )
+ wayland? (
+ =kde-frameworks/kwayland-${PVCUT}*:5
+ media-libs/libglvnd
+ )
+ X? (
+ >=dev-qt/qtx11extras-${QTMIN}:5
+ x11-libs/libX11
+ x11-libs/libxcb
+ )
+"
+DEPEND="${RDEPEND}
+ X? ( x11-base/xorg-proto )
+"
+BDEPEND="man? ( >=kde-frameworks/kdoctools-${PVCUT}:5 )"
+
+PATCHES=(
+ "${FILESDIR}/${P}-revert-QT_FEATURE_foo.patch"
+ "${FILESDIR}/${P}-fix-sizeForLabels-double-scaling.patch"
+)
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake_use_find_package !gles2-only OpenGL)
+ $(cmake_use_find_package man KF5DocTools)
+ $(cmake_use_find_package wayland EGL)
+ $(cmake_use_find_package wayland KF5Wayland)
+ $(cmake_use_find_package X X11)
+ $(cmake_use_find_package X XCB)
+ )
+
+ ecm_src_configure
+}