[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#863417: marked as done (plasma-framework: Desktop icons are shown distorted; Upstream-patch available (meanwhile))



Your message dated Mon, 10 Jul 2017 07:29:04 +0000
with message-id <E1dUT7w-000A9N-VQ@fasolo.debian.org>
and subject line Bug#863417: fixed in plasma-framework 5.36.0-1
has caused the Debian Bug report #863417,
regarding plasma-framework: Desktop icons are shown distorted; Upstream-patch available (meanwhile)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
863417: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=863417
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: plasma-framework
Version: 5.28.0-2
Severity: normal
Tags: patch upstream

Dear Maintainer,

plasma-framework version 5.28, which is currently in Debian testing,
contains a bug, which leads to distorted/stretched icons on the Desktop
(or within the folderview widget).

This bug is very annoying as Desktop icons are sth. you always get in
touch with.

Fortunately, this issue is known by the upstream-developers and has
been fixed short time after releasing version 5.28, see:

https://bugs.kde.org/show_bug.cgi?id=355592

The provided patch is clear and applies without any conflicts (to
Debian's codebase):

https://commits.kde.org/plasma-framework/d46a91ea57f19e33e6f3a08ec86084b7e11a8e1a

I am using Debian testing (/stretch).

Please consider to integrate the patch (in one of the) upcoming Debian
revision(s).

(I also attached a "quilt patch" in case that it could be useful...)

Thanks a lot and regards, Gerhard


-- System Information:
Debian Release: 9.0
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64
 (x86_64)

Kernel: Linux 4.9.0-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages plasma-framework depends on:
ii  kio                                      5.28.0-2
ii  kpackagetool5                            5.28.1-1
ii  libc6                                    2.24-10
ii  libegl1-mesa [libegl1-x11]               13.0.6-1+b2
ii  libgl1-mesa-glx [libgl1]                 13.0.6-1+b2
ii  libkf5activities5                        5.28.0-1
ii  libkf5calendarevents5                    5.28.0-1
ii  libkf5configcore5                        5.28.0-2
ii  libkf5configgui5                         5.28.0-2
ii  libkf5coreaddons5                        5.28.0-2
ii  libkf5declarative5                       5.28.0-1
ii  libkf5i18n5                              5.28.0-2
ii  libkf5iconthemes5                        5.28.0-2
ii  libkf5kiocore5                           5.28.0-2
ii  libkf5notifications5                     5.28.0-1
ii  libkf5package5                           5.28.1-1
ii  libkf5plasma5                            5.28.0-2
ii  libkf5plasmaquick5                       5.28.0-2
ii  libkf5quickaddons5                       5.28.0-1
ii  libkf5service-bin                        5.28.0-1
ii  libkf5service5                           5.28.0-1
ii  libkf5windowsystem5                      5.28.0-2
ii  libkf5xmlgui5                            5.28.0-1
ii  libqt5core5a                             5.7.1+dfsg-3+b1
ii  libqt5gui5                               5.7.1+dfsg-3+b1
ii  libqt5qml5                               5.7.1-2+b2
ii  libqt5quick5                             5.7.1-2+b2
ii  libqt5widgets5                           5.7.1+dfsg-3+b1
ii  libqt5x11extras5                         5.7.1~20161021-2
ii  libstdc++6                               6.3.0-18
ii  libx11-6                                 2:1.6.4-3
ii  libxcb-composite0                        1.12-1
ii  libxcb-damage0                           1.12-1
ii  libxcb1                                  1.12-1
ii  qml-module-org-kde-kquickcontrols        5.28.0-1
ii  qml-module-org-kde-kquickcontrolsaddons  5.28.0-1
ii  qml-module-qtquick-controls              5.7.1~20161021-2

plasma-framework recommends no packages.

plasma-framework suggests no packages.

-- no debconf information
>From abcdc21037033f3b09ab45e2ccd0ae2b277074c3 Mon Sep 17 00:00:00 2001
From: "Gerhard A. Dittes" <maestro.gerardo@gmail.com>
Date: Fri, 26 May 2017 16:36:16 +0200
Subject: [PATCH] Add patch "[Icon Item] Support non-square icons".

The fix is picked from upstream (w/o changes), see:
https://bugs.kde.org/show_bug.cgi?id=355592
---
 .../Icon-Item-Support-non-square-icons.patch       | 166 +++++++++++++++++++++
 debian/patches/series                              |   1 +
 2 files changed, 167 insertions(+)
 create mode 100644 debian/patches/Icon-Item-Support-non-square-icons.patch

diff --git a/debian/patches/Icon-Item-Support-non-square-icons.patch b/debian/patches/Icon-Item-Support-non-square-icons.patch
new file mode 100644
index 0000000..1a8e754
--- /dev/null
+++ b/debian/patches/Icon-Item-Support-non-square-icons.patch
@@ -0,0 +1,166 @@
+Description: Pick "[Icon Item] Support non-square icons" (d46a91e).
+
+This fixes KDE#355592.
+
+--- plasma-framework-5.28.0.orig/autotests/iconitemtest.cpp
++++ plasma-framework-5.28.0/autotests/iconitemtest.cpp
+@@ -441,5 +441,44 @@ void IconItemTest::windowChanged()
+     QCOMPARE(grabImage(item), img);
+ }
+ 
++void IconItemTest::paintedSize()
++{
++    QQuickItem *item = createIconItem();
++
++    QCOMPARE(item->property("paintedWidth").toInt(), item->property("implicitWidth").toInt());
++    QCOMPARE(item->property("paintedHeight").toInt(), item->property("implicitHeight").toInt());
++
++    item->setWidth(40);
++    item->setHeight(40);
++
++    QCOMPARE(item->property("paintedWidth").toInt(), 32);
++    QCOMPARE(item->property("paintedHeight").toInt(), 32);
++
++    QIcon landscapeIcon(QPixmap(40, 35));
++    item->setProperty("source", landscapeIcon);
++    grabImage(item); // basically just to force loading the pixmap
++
++    // expanded to fit IconItem size whilst keeping aspect ratio
++    // width should be rounded to icon size, ie. 32 is next smallest
++    QCOMPARE(item->property("paintedWidth").toInt(), 32);
++    // height should still match aspect ratio, so *not* 24!
++    QCOMPARE(item->property("paintedHeight").toInt(), 28);
++
++    QIcon portraitIcon(QPixmap(15, 40));
++    item->setProperty("source", portraitIcon);
++    grabImage(item);
++
++    QCOMPARE(item->property("paintedWidth").toInt(), 12);
++    QCOMPARE(item->property("paintedHeight").toInt(), 32);
++
++    item->setWidth(400);
++    item->setHeight(400);
++
++    grabImage(item);
++
++    QCOMPARE(item->property("paintedWidth").toInt(), 150);
++    QCOMPARE(item->property("paintedHeight").toInt(), 400);
++}
++
+ QTEST_MAIN(IconItemTest)
+ 
+--- plasma-framework-5.28.0.orig/autotests/iconitemtest.h
++++ plasma-framework-5.28.0/autotests/iconitemtest.h
+@@ -54,6 +54,7 @@ private Q_SLOTS:
+     void animatingActiveChange();
+     void animatingEnabledChange();
+     void windowChanged();
++    void paintedSize();
+ 
+ private:
+     QQuickItem *createIconItem();
+--- plasma-framework-5.28.0.orig/src/declarativeimports/core/iconitem.cpp
++++ plasma-framework-5.28.0/src/declarativeimports/core/iconitem.cpp
+@@ -309,12 +309,37 @@ bool IconItem::isValid() const
+ 
+ int IconItem::paintedWidth() const
+ {
+-    return Units::roundToIconSize(qMin(boundingRect().size().width(), boundingRect().size().height()));
++    return paintedSize(boundingRect().size()).width();
+ }
+ 
+ int IconItem::paintedHeight() const
+ {
+-    return Units::roundToIconSize(qMin(boundingRect().size().width(), boundingRect().size().height()));
++    return paintedSize(boundingRect().size()).height();
++}
++
++QSize IconItem::paintedSize(const QSizeF &containerSize) const
++{
++    const QSize &actualContainerSize = (containerSize.isValid() ? containerSize : boundingRect().size()).toSize();
++
++    const QSize paintedSize = m_iconPixmap.size().scaled(actualContainerSize, Qt::KeepAspectRatio);
++
++    const int width = paintedSize.width();
++    const int height = paintedSize.height();
++
++    if (width == height) {
++        return QSize(Units::roundToIconSize(width), Units::roundToIconSize(height));
++    }
++
++    // if we don't have a square image, we still want it to be rounded to icon size
++    // but we cannot just blindly round both as we might erroneously change a 50x45 image to be 48x32
++    // instead, round the bigger of the two and then downscale the smaller with the ratio
++    if (width > height) {
++        const int roundedWidth = Units::roundToIconSize(width);
++        return QSize(roundedWidth, qRound(height * (roundedWidth / static_cast<qreal>(width))));
++    } else {
++        const int roundedHeight = Units::roundToIconSize(height);
++        return QSize(qRound(width * (roundedHeight / static_cast<qreal>(height))), roundedHeight);
++    }
+ }
+ 
+ void IconItem::setStatus(Plasma::Svg::Status status)
+@@ -366,10 +391,8 @@ QSGNode* IconItem::updatePaintNode(QSGNo
+         animatingNode->setProgress(m_animValue);
+ 
+         if (m_sizeChanged) {
+-            const int iconSize = Units::roundToIconSize(qMin(boundingRect().size().width(), boundingRect().size().height()));
+-            const QRect destRect(QPointF(boundingRect().center() - QPointF(iconSize/2, iconSize/2)).toPoint(),
+-                                 QSize(iconSize, iconSize));
+-
++            const QSize newSize = paintedSize();
++            const QRect destRect(QPointF(boundingRect().center() - QPointF(newSize.width(), newSize.height()) / 2).toPoint(), newSize);
+             animatingNode->setRect(destRect);
+             m_sizeChanged = false;
+         }
+@@ -387,10 +410,8 @@ QSGNode* IconItem::updatePaintNode(QSGNo
+         }
+ 
+         if (m_sizeChanged) {
+-            const int iconSize = Units::roundToIconSize(qMin(boundingRect().size().width(), boundingRect().size().height()));
+-            const QRect destRect(QPointF(boundingRect().center() - QPointF(iconSize/2, iconSize/2)).toPoint(),
+-                                 QSize(iconSize, iconSize));
+-
++            const QSize newSize = paintedSize();
++            const QRect destRect(QPointF(boundingRect().center() - QPointF(newSize.width(), newSize.height()) / 2).toPoint(), newSize);
+             textureNode->setRect(destRect);
+             m_sizeChanged = false;
+         }
+@@ -489,10 +510,16 @@ void IconItem::loadPixmap()
+         result = KIconLoader::global()->iconEffect()->apply(result, KIconLoader::Desktop, KIconLoader::ActiveState);
+     }
+ 
++    const QSize oldPaintedSize = paintedSize();
++
+     m_oldIconPixmap = m_iconPixmap;
+     m_iconPixmap = result;
+     m_textureChanged = true;
+ 
++    if (oldPaintedSize != paintedSize()) {
++        emit paintedSizeChanged();
++    }
++
+     //don't animate initial setting
+     if ((m_animated || m_allowNextAnimation) && !m_oldIconPixmap.isNull() && !m_sizeChanged && !m_blockNextAnimation) {
+         m_animValue = 0.0;
+@@ -528,8 +555,7 @@ void IconItem::geometryChanged(const QRe
+             update();
+         }
+ 
+-        if (Units::roundToIconSize(qMin(oldGeometry.size().width(), oldGeometry.size().height())) !=
+-            Units::roundToIconSize(qMin(newGeometry.size().width(), newGeometry.size().height()))) {
++        if (paintedSize(oldGeometry.size()) != paintedSize(newGeometry.size())) {
+             emit paintedSizeChanged();
+         }
+     }
+--- plasma-framework-5.28.0.orig/src/declarativeimports/core/iconitem.h
++++ plasma-framework-5.28.0/src/declarativeimports/core/iconitem.h
+@@ -176,6 +176,7 @@ private Q_SLOTS:
+ 
+ private:
+     void loadPixmap();
++    QSize paintedSize(const QSizeF &containerSize = QSizeF()) const;
+ 
+     //all the ways we can set an source. Only one of them will be valid
+     QIcon m_icon;
diff --git a/debian/patches/series b/debian/patches/series
index a01aa28..7b0bbf2 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -7,3 +7,4 @@ correctly-forward-status-from-applets-to-containment.patch
 it-must-also-be-possible-for-the-status-to-be-decreased-a.patch
 set-default-hints-when-repr-doesn-t-export-Layout.patch
 Ref-deref-DataEngines-even-if-the-metadata-is-invalid.patch
+Icon-Item-Support-non-square-icons.patch
-- 
2.11.0


--- End Message ---
--- Begin Message ---
Source: plasma-framework
Source-Version: 5.36.0-1

We believe that the bug you reported is fixed in the latest version of
plasma-framework, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 863417@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Maximiliano Curia <maxy@debian.org> (supplier of updated plasma-framework package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 09 Jul 2017 23:42:48 +0200
Source: plasma-framework
Binary: libkf5plasma-dev plasma-framework-dev plasma-framework libkf5plasmaquick5 libkf5plasma5
Architecture: source
Version: 5.36.0-1
Distribution: experimental
Urgency: medium
Maintainer: Debian/Kubuntu Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Changed-By: Maximiliano Curia <maxy@debian.org>
Description:
 libkf5plasma-dev - development files for plasma-framework
 libkf5plasma5 - Plasma Runtime components
 libkf5plasmaquick5 - Plasma Runtime components
 plasma-framework - Plasma Runtime components
 plasma-framework-dev - transitional dummy package
Closes: 863417
Changes:
 plasma-framework (5.36.0-1) experimental; urgency=medium
 .
   [ Maximiliano Curia ]
   * New upstream release (5.35.0).
     + Support non-square icons (Closes: 863417)
   * Bump Standards-Version to 4.0.0.
   * Update build-deps and deps with the info from cmake
   * Bump group breaks (5.35)
   * Drop upstream patches
   * Update symbols files.
   * watch: Use https uris
   * New upstream release (5.36.0).
   * Bump group breaks (5.36)
   * Update build-deps and deps with the info from cmake
   * Update symbols files
 .
   [ Raymond Wooninck ]
   * also include signing-key
   * Add signing key
 .
   [ Jonathan Riddell ]
   * update .install
   * new dep on qml-module-org-kde-kconfig
   * install qml-module-qtquick-templates2
   * more qml deps
   * ECMConfig.cmake
 .
   [ Harald Sitter ]
   * start openbox for dialogstatetest
Checksums-Sha1:
 fe9d931596b6c523c4336487784a23a94b7f5523 3797 plasma-framework_5.36.0-1.dsc
 088526d9d8f7185c7cdffbb3727d48c71b8f8a3a 4605968 plasma-framework_5.36.0.orig.tar.xz
 6fec173e4487302d9a673e8c27d93de912e729d3 19676 plasma-framework_5.36.0-1.debian.tar.xz
 cc8961c4530638694241ab7a3bffca174890f8ff 15735 plasma-framework_5.36.0-1_source.buildinfo
Checksums-Sha256:
 3769459c0a329defdb91f905f38ae8eda3db4371da26c5b5dbeed431e253f6cf 3797 plasma-framework_5.36.0-1.dsc
 7060e5b61eb8b00a350967528e0c22e18edd9cdc2cb7cb398aae3874ac859f17 4605968 plasma-framework_5.36.0.orig.tar.xz
 14c7fb5076f5bf6d7ef81c870c24dc9fed7eac4d552958b9072f5695aa3b1825 19676 plasma-framework_5.36.0-1.debian.tar.xz
 b964362841c5a95f7f304d6b4da01d577fd712a3b47a070a316948474c107170 15735 plasma-framework_5.36.0-1_source.buildinfo
Files:
 700e97b5c9c29871a0099679d6c79d3d 3797 libs optional plasma-framework_5.36.0-1.dsc
 f212c5751b3c91126a7ec6646399cc45 4605968 libs optional plasma-framework_5.36.0.orig.tar.xz
 481d4125dfb9e591f17560b9864a28b4 19676 libs optional plasma-framework_5.36.0-1.debian.tar.xz
 90a00f96072f3de848e5b646414c5532 15735 libs optional plasma-framework_5.36.0-1_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEE+JIdOnQEyG4RNSIVxxl2mbKbIyoFAlljKQcACgkQxxl2mbKb
IyrG8hAAkDzWHC0kgiYuou9e6B+sgx75ZkPQSVYlQ5VKo8f8JcvgsOId2X/H/VMC
bxIcsWPtePQWxNJeCgb6BKA95ZKE/EI9U6BLFEfdI66G50FcF3iFh4Sgmb8B49HI
eDKwAEv8RXbO+fZgRJZFetJjybrvoCvHUoXpKRFJmnvyxuqfd75OifBWWHFPrrmH
wBOws6h9Mu/XFLFOLvZ1reuP6MrT6cQ09QhzieDDSbQr802AqO7VU6O5rdWAldTM
EmKnMPaIwmksvdLocVRGJuGyWodhUaUZyAKPRT6pOrqxzhzYVvrnHTacWzTGHrtF
JojrF+Rhv07KZTE7UcUVXas9ry6buQmC/QiNPVXOlTs/5X7Ft8OClW4FUdBlf6mR
DtkojyWJNsYc+PgP7V3D4vSI8FTAATrMyk/E6rjnqk9Rtap3WBSTmOLM1V6HUEvz
pACtsyudvbaWK07hx3J/cXaYCQGNi1E4O8FzOowrhwFmsZMMm3cEOQCvHapQ0pjT
+iA8OMgJDF4EY6p0BRqBmOu3ZauzyEfHo0hTPybKAbsOjZRQtELQyC4MtfB13y+6
GDe6hAZDXjE/TGMRySRm1t0NgYMc2F9orSWf3kTYCJaUFBnPP4AMi3d1tbzWI9Vh
pSSzBIsA4I5Pax7PXfuoNyPxkJWmcRM09V+h3XKX2AESaa6xS9A=
=tS6E
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: