public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/plasma/, kde-frameworks/plasma/files/
Date: Sun, 15 Aug 2021 18:57:58 +0000 (UTC)	[thread overview]
Message-ID: <1629053796.19f8c459f7a27534e261a378ca4828b0e6e1ab03.asturm@gentoo> (raw)

commit:     19f8c459f7a27534e261a378ca4828b0e6e1ab03
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 15 18:18:58 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Aug 15 18:56:36 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=19f8c459

kde-frameworks/plasma: Fix Plasma (non-Qt) icon scaling

...with integer scale factors.

See also:
https://invent.kde.org/frameworks/plasma-framework/-/merge_requests/320

Upstream commit 837bb6975f6a0661d211107823b7587808fc3d4e

Package-Manager: Portage-3.0.20, Repoman-3.0.3
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 ....0-fix-plasma-scaling-w-int-scale-factors.patch | 44 ++++++++++++++++++++++
 ...lasma-5.85.0.ebuild => plasma-5.85.0-r1.ebuild} |  2 +
 2 files changed, 46 insertions(+)

diff --git a/kde-frameworks/plasma/files/plasma-5.85.0-fix-plasma-scaling-w-int-scale-factors.patch b/kde-frameworks/plasma/files/plasma-5.85.0-fix-plasma-scaling-w-int-scale-factors.patch
new file mode 100644
index 00000000000..9c0e9046496
--- /dev/null
+++ b/kde-frameworks/plasma/files/plasma-5.85.0-fix-plasma-scaling-w-int-scale-factors.patch
@@ -0,0 +1,44 @@
+From 837bb6975f6a0661d211107823b7587808fc3d4e Mon Sep 17 00:00:00 2001
+From: Nate Graham <nate@kde.org>
+Date: Sun, 15 Aug 2021 09:33:10 -0600
+Subject: [PATCH] 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
+-- 
+GitLab
+

diff --git a/kde-frameworks/plasma/plasma-5.85.0.ebuild b/kde-frameworks/plasma/plasma-5.85.0-r1.ebuild
similarity index 96%
rename from kde-frameworks/plasma/plasma-5.85.0.ebuild
rename to kde-frameworks/plasma/plasma-5.85.0-r1.ebuild
index 48d5e24d902..92d12a32c09 100644
--- a/kde-frameworks/plasma/plasma-5.85.0.ebuild
+++ b/kde-frameworks/plasma/plasma-5.85.0-r1.ebuild
@@ -61,6 +61,8 @@ DEPEND="${RDEPEND}
 	X? ( x11-base/xorg-proto )
 "
 
+PATCHES=( "${FILESDIR}"/${P}-fix-plasma-scaling-w-int-scale-factors.patch )
+
 src_configure() {
 	local mycmakeargs=(
 		$(cmake_use_find_package !gles2-only OpenGL)


             reply	other threads:[~2021-08-16 20:48 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-15 18:57 Andreas Sturmlechner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2023-02-01 19:46 [gentoo-commits] repo/gentoo:master commit in: kde-frameworks/plasma/, kde-frameworks/plasma/files/ Andreas Sturmlechner
2023-01-29  0:12 Andreas Sturmlechner
2022-11-27 11:20 Andreas Sturmlechner
2022-08-06  7:44 Andreas Sturmlechner
2022-07-26 12:08 Andreas Sturmlechner
2022-06-14 12:44 Andreas Sturmlechner
2022-04-21  8:56 Andreas Sturmlechner
2022-04-15 18:27 Andreas Sturmlechner
2022-03-30 14:41 Andreas Sturmlechner
2022-02-10  9:13 Andreas Sturmlechner
2021-12-08 15:08 Andreas Sturmlechner
2021-11-23 14:59 Andreas Sturmlechner
2021-10-11 11:01 Andreas Sturmlechner
2021-09-30 17:24 Andreas Sturmlechner
2021-08-26 17:28 Andreas Sturmlechner
2021-08-15 18:57 Andreas Sturmlechner
2021-01-11 12:28 Andreas Sturmlechner
2020-11-16 23:41 Andreas Sturmlechner
2020-10-26 19:06 Andreas Sturmlechner
2020-04-17 20:59 Andreas Sturmlechner
2020-02-13 23:20 Andreas Sturmlechner
2019-03-13 11:05 Andreas Sturmlechner
2017-04-15 20:31 Andreas Sturmlechner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1629053796.19f8c459f7a27534e261a378ca4828b0e6e1ab03.asturm@gentoo \
    --to=asturm@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox