D26370: Port away from KIconThemes
Elvis Angelaccio
noreply at phabricator.kde.org
Mon Jan 6 12:19:02 GMT 2020
elvisangelaccio added a comment.
@nicolasfella I don't like the hardcoding of 48. If there is no clean way to port `IconSize(KIconLoader::Desktop)`, I'd prefer to port to a different non-hardcoded size.
INLINE COMMENTS
> extractiondialog.cpp:85
>
> - m_ui->iconLabel->setPixmap(QIcon::fromTheme(QStringLiteral("archive-extract")).pixmap(IconSize(KIconLoader::Desktop), IconSize(KIconLoader::Desktop)));
> + m_ui->iconLabel->setPixmap(QIcon::fromTheme(QStringLiteral("archive-extract")).pixmap(48));
>
We can use `PM_LargeIconSize` here.
> propertiesdialog.cpp:104
> QIcon icon = QIcon::fromTheme(archive->mimeType().iconName());
> - m_ui->lblIcon->setPixmap(icon.pixmap(IconSize(KIconLoader::Desktop), IconSize(KIconLoader::Desktop)));
> + m_ui->lblIcon->setPixmap(icon.pixmap(48));
>
We can use `PM_LargeIconSize` here. The icon in the properties dialog is pointless anyway.
> infopanel.cpp:35
>
> -static QPixmap getDesktopIconForName(const QString& name)
> {
Why remove `static` ?
> infopanel.cpp:36
> {
> - return QIcon::fromTheme(name).pixmap(IconSize(KIconLoader::Desktop), IconSize(KIconLoader::Desktop));
> + return QIcon::fromTheme(name).pixmap(48);
> }
The infopanel is the only place where the Desktop size made sense (lots of space), at most we can hardcode 48 only here.
REPOSITORY
R36 Ark
REVISION DETAIL
https://phabricator.kde.org/D26370
To: nicolasfella, #ark, davidedmundson
Cc: elvisangelaccio, kde-utils-devel, fbampaloukas, tctara
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-utils-devel/attachments/20200106/04e32f94/attachment.html>
More information about the Kde-utils-devel
mailing list