[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kdeui/icons
From: Peter Penz <peter.penz () gmx ! at>
Date: 2009-04-10 21:20:33
Message-ID: 1239398433.408295.29815.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 952085 by ppenz:
If the requested icon size is greater than the available size from the directory, \
continue with the next directory that provides a bigger icon size. This prevents that \
icons get upscaled although downscaling the larger version of an icon will result in \
a sharper image.
To compare the results:
- Open Dolphin in the icons view showing some directories. Turn off previews.
- Increase the icon size to 192x192 pixels.
With the previous version of kicontheme the 128x128 got upscaled to 192x192 pixels \
and looked blurry, with the current version the 256x256 version will get downscaled \
to 192x192 pixels (BTW: with the old version starting with a size of 200x200 pixels \
the 256x256 version got downscaled too).
CCMAIL: aseigo@kde.org
M +5 -2 kicontheme.cpp
--- trunk/KDE/kdelibs/kdeui/icons/kicontheme.cpp #952084:952085
@@ -447,9 +447,12 @@
if ((dir->type() == KIconLoader::Scalable) &&
((size < dir->minSize()) || (size > dir->maxSize())))
continue;
- if ((dir->type() == KIconLoader::Threshold) &&
- (abs(dir->size()-size) > dir->threshold()))
+ if (dir->type() == KIconLoader::Threshold)
+ {
+ const int diff = dir->size() - size;
+ if ((diff < 0) && (-diff > dir->threshold()))
continue;
+ }
} else
{
// dw < 0 means need to scale up to get an icon of the requested size
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic