]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/iconmanager.cpp
Bypassed a Qt-issue where enabling the menu-animation for QApplication emits a clicke...
[dolphin.git] / src / iconmanager.cpp
index cfdf13a7c84d2f87b8d8b0f1d15bd2f83fe57162..b46328ceaef89d9094304b1b84d3befa1c01c43e 100644 (file)
@@ -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;
     }