Review Request 120155: Correctly load non-square icons in KIconLoader
Dan Vrátil
dvratil at redhat.com
Fri Sep 12 10:58:31 UTC 2014
> On Sept. 12, 2014, 12:49 p.m., Christoph Feck wrote:
> > Use KPixmapSequence if you need to access an FDO animation icon.
That's the thing: I want to feed the animation icon to KPixmapSequence, but KPixmapSequence only accepts full file path, or QPixmap. And I can't get the filename without depending on KIconTheme, which I cannot (I'm trying to add a widget to KWidgetsAddons), so the approach of getting a QPixmap from QIcon is the only way.
- Dan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/120155/#review66332
-----------------------------------------------------------
On Sept. 12, 2014, 10:35 a.m., Dan Vrátil wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120155/
> -----------------------------------------------------------
>
> (Updated Sept. 12, 2014, 10:35 a.m.)
>
>
> Review request for KDE Frameworks.
>
>
> Repository: kiconthemes
>
>
> Description
> -------
>
> KIconLoader (and KIconTheme) were always using single int to specify icon size, which implies only square icons. When requesting non-square icons however (such as pixmap sequence animations), the returned QPixmap is deformed. This patch ports all internals of KIconLoader to QSize.
>
>
> Diffs
> -----
>
> src/kiconengine.cpp 530403e
> src/kiconloader.h 46d3017
> src/kiconloader.cpp 2587b46
> src/kicontheme.h ca04879
> src/kicontheme.cpp 4f0e522
>
> Diff: https://git.reviewboard.kde.org/r/120155/diff/
>
>
> Testing
> -------
>
> QIcon icon = QIcon::fromTheme(QLatin1String("process-working"));
> QPixmap pix = icon.pixmap(22, 8 * 22);
>
> With this patch, the pix looks as expected.
>
>
> Thanks,
>
> Dan Vrátil
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140912/2a82af94/attachment.html>
More information about the Kde-frameworks-devel
mailing list