> On Sept. 12, 2014, 10:49 a.m., Christoph Feck wrote: > > Use KPixmapSequence if you need to access an FDO animation icon. > > Dan Vrátil wrote: > 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. > > Christoph Feck wrote: > Could you be more specific what kind of widget you plan to add to > KWidgetAddons? I would really like to know if there is a way to solve this > issue without potentially breaking users expecting to get square icons inside > any sized rectangle. > > Michael Pyne wrote: > Right now KIconLoader does two things (among others): 1) Lookup the right > path to an icon from a given icon-name, and 2) actually read in that icon and > return it as a pixmap of some form. It sounds to me like we want to be able > to do *only* 1) here and then let KPixmapSequence finish the process by doing > 2) with its own specific method? Maybe instead of loading a non-square icon > we can instead add a method that returns the resolved path to an icon-name?
See KIconLoader::iconPath(). The issue here, however, is that Dan wants to be able to do this without depending on KIconThemes. - Christoph ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://git.reviewboard.kde.org/r/120155/#review66332 ----------------------------------------------------------- On Sept. 18, 2014, 8:48 p.m., Dan Vrátil wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://git.reviewboard.kde.org/r/120155/ > ----------------------------------------------------------- > > (Updated Sept. 18, 2014, 8:48 p.m.) > > > Review request for KDE Frameworks and Christoph Feck. > > > 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 > >
_______________________________________________ Kde-frameworks-devel mailing list Kde-frameworks-devel@kde.org https://mail.kde.org/mailman/listinfo/kde-frameworks-devel