mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-23 18:32:49 +00:00
kdeui: convert KIconLoaderPrivate::overlaySize() to static method
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
4ea318b347
commit
9c4a2560c4
1 changed files with 3 additions and 3 deletions
|
@ -259,7 +259,7 @@ public:
|
||||||
* @internal
|
* @internal
|
||||||
* Returns size suitable for overlay image based on the width and height of @p size.
|
* Returns size suitable for overlay image based on the width and height of @p size.
|
||||||
*/
|
*/
|
||||||
int overlaySize(const QSize &size) const;
|
static int overlaySize(const QSize &size);
|
||||||
|
|
||||||
KIconLoader *const q;
|
KIconLoader *const q;
|
||||||
|
|
||||||
|
@ -790,7 +790,7 @@ bool KIconLoaderPrivate::findCachedPixmapWithPath(const QString &key, QPixmap &d
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int KIconLoaderPrivate::overlaySize(const QSize &size) const
|
int KIconLoaderPrivate::overlaySize(const QSize &size)
|
||||||
{
|
{
|
||||||
const int minSize = qMin(size.width(), size.height());
|
const int minSize = qMin(size.width(), size.height());
|
||||||
if (minSize < 32) {
|
if (minSize < 32) {
|
||||||
|
@ -1116,7 +1116,7 @@ QPixmap KIconLoader::loadIcon(const QString& _name, KIconLoader::Group group, in
|
||||||
}
|
}
|
||||||
|
|
||||||
// ensure the icon size is suitable for overlay
|
// ensure the icon size is suitable for overlay
|
||||||
const int iconSize = d->overlaySize(img.size());
|
const int iconSize = KIconLoaderPrivate::overlaySize(img.size());
|
||||||
favIcon = favIcon.scaled(QSize(iconSize, iconSize), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
favIcon = favIcon.scaled(QSize(iconSize, iconSize), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
|
||||||
|
|
||||||
QPainter p(&img);
|
QPainter p(&img);
|
||||||
|
|
Loading…
Add table
Reference in a new issue