diff --git a/0017-Fix-Plasma-non-Qt-icon-scaling-with-integer-scale-fa.patch b/0017-Fix-Plasma-non-Qt-icon-scaling-with-integer-scale-fa.patch new file mode 100644 index 0000000..168ad65 --- /dev/null +++ b/0017-Fix-Plasma-non-Qt-icon-scaling-with-integer-scale-fa.patch @@ -0,0 +1,45 @@ +From 837bb6975f6a0661d211107823b7587808fc3d4e Mon Sep 17 00:00:00 2001 +From: Nate Graham +Date: Sun, 15 Aug 2021 09:33:10 -0600 +Subject: [PATCH 17/36] Fix Plasma (non-Qt) icon scaling with integer scale + factors + +An embarrassing error in 4edb830f53aac4833ece024df59441029b01fde6 +caused the function which returns an appropriate scale factor for icons +to both take and return integer values rather than floating point +values, preventing it from working properly with any scale factor other +than an integer scale factor (e.g. 200%). This commit fixes that issue. +--- + src/declarativeimports/core/units.cpp | 2 +- + src/declarativeimports/core/units.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/declarativeimports/core/units.cpp b/src/declarativeimports/core/units.cpp +index 6788ed952..fbcc6d888 100644 +--- a/src/declarativeimports/core/units.cpp ++++ b/src/declarativeimports/core/units.cpp +@@ -174,7 +174,7 @@ int Units::roundToIconSize(int size) + } + } + +-int Units::bestIconScaleForDevicePixelRatio(const int ratio) ++qreal Units::bestIconScaleForDevicePixelRatio(const qreal ratio) + { + if (ratio < 1.5) { + return 1; +diff --git a/src/declarativeimports/core/units.h b/src/declarativeimports/core/units.h +index c19cf0dd8..855738e7d 100644 +--- a/src/declarativeimports/core/units.h ++++ b/src/declarativeimports/core/units.h +@@ -271,7 +271,7 @@ private: + * Note that this function is only relevant when using Plasma scaling and + * when using Qt scaling, it always returns 1. + */ +- static int bestIconScaleForDevicePixelRatio(const int ratio); ++ static qreal bestIconScaleForDevicePixelRatio(const qreal ratio); + + /** + * @return The dpi-adjusted size for a given icon size +-- +2.31.1 + diff --git a/kf5-plasma.spec b/kf5-plasma.spec index 761281d..fdc81e9 100644 --- a/kf5-plasma.spec +++ b/kf5-plasma.spec @@ -2,11 +2,11 @@ Name: kf5-%{framework} Version: 5.85.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: KDE Frameworks 5 Tier 3 framework is foundation to build a primary user interface License: GPLv2+ and LGPLv2+ and BSD -URL: https://cgit.kde.org/plasma-framework.git +URL: https://invent.kde.org/frameworks/%{framework} %global majmin %(echo %{version} | cut -d. -f1-2) %global revision %(echo %{version} | cut -d. -f3) @@ -21,7 +21,8 @@ Source0: http://download.kde.org/%{stable}/frameworks/%{majmin}/%{framework}-fra # upstream has worked on this issue recently (.31 or .32?) so may consider dropping this -- rex Source10: fedora-plasma-cache.sh.in -## upstream patches (using lookaside cache) +## upstream patches +Patch17: 0017-Fix-Plasma-non-Qt-icon-scaling-with-integer-scale-fa.patch # filter qml provides %global __provides_exclude_from ^%{_kf5_qmldir}/.*\\.so$ @@ -171,6 +172,10 @@ sed -e "s|@@VERSION@@|%{version}|g" fedora-plasma-cache.sh.in > \ %changelog +* Tue Aug 24 2021 Rex Dieter - 5.85.0-2 +- backport upstream fix for fractional scaled icons +- fix URL + * Thu Aug 12 2021 Rex Dieter - 5.85.0-1 - 5.85.0