From 2719f73b6813d11d13a9650cdd2ab8ec6e69385d Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 9 Jul 2022 15:43:36 +0100 Subject: gentoo resync : 09.07.2022 --- ...a-5.95.0-fix-sizeForLabels-double-scaling.patch | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 kde-frameworks/plasma/files/plasma-5.95.0-fix-sizeForLabels-double-scaling.patch (limited to 'kde-frameworks/plasma/files') 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 +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 + -- cgit v1.2.3