┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2008-04-08 16:03:02 +0000
committerPeter Penz <[email protected]>2008-04-08 16:03:02 +0000
commit15ede69da8cc5f107b96a51af5ad8f76bb0424ce (patch)
tree49ad7e4b9cdd7f622d12161067008978ee6464a3 /src
parent4b859a36214ee49305d3ca6c301d2ce85c2d9e31 (diff)
don't apply a frame to image previews, if the preview is a very small image (e. g. an icon)
CCMAIL: [email protected] svn path=/trunk/KDE/kdebase/apps/; revision=794783
Diffstat (limited to 'src')
-rw-r--r--src/iconmanager.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/iconmanager.cpp b/src/iconmanager.cpp
index cfdf13a7c..b46328cea 100644
--- a/src/iconmanager.cpp
+++ b/src/iconmanager.cpp
@@ -294,8 +294,12 @@ void IconManager::applyCutItemEffect()
bool IconManager::applyImageFrame(QPixmap& icon)
{
const QSize maxSize = m_view->iconSize();
- if ((maxSize.width() <= 24) || (maxSize.height() <= 24)) {
- // the maximum size is too small for a frame
+ const bool applyFrame = (maxSize.width() > KIconLoader::SizeSmallMedium) &&
+ (maxSize.height() > KIconLoader::SizeSmallMedium) &&
+ ((icon.width() > KIconLoader::SizeLarge) ||
+ (icon.height() > KIconLoader::SizeLarge));
+ if (!applyFrame) {
+ // the maximum size or the image itself is too small for a frame
return false;
}