]> cloud.milkyroute.net Git - dolphin.git/commitdiff
don't increase the decoration size if the icons are aligned from left to right
authorPeter Penz <peter.penz19@gmail.com>
Thu, 17 May 2007 08:42:07 +0000 (08:42 +0000)
committerPeter Penz <peter.penz19@gmail.com>
Thu, 17 May 2007 08:42:07 +0000 (08:42 +0000)
svn path=/trunk/KDE/kdebase/apps/; revision=665573

src/dolphiniconsview.cpp

index c80a58b6b3dd4629c7fe9f71c03db46aad929914..f8d149b56eed026c708cce691ae4bc86343357f4 100644 (file)
@@ -267,10 +267,14 @@ void DolphinIconsView::updateGridSize(bool showPreview, bool showAdditionalInfo)
         itemHeight += m_viewOptions.font.pointSize() * 2;
     }
 
         itemHeight += m_viewOptions.font.pointSize() * 2;
     }
 
-    // The decoration width indirectly defines the maximum
-    // width for the text wrapping. To use the maximum item width
-    // for text wrapping, it is used as decoration width.
-    m_viewOptions.decorationSize = QSize(itemWidth, size);
+    if (settings->arrangement() == QListView::TopToBottom) {
+        // The decoration width indirectly defines the maximum
+        // width for the text wrapping. To use the maximum item width
+        // for text wrapping, it is used as decoration width.
+        m_viewOptions.decorationSize = QSize(itemWidth, size);
+    } else {
+        m_viewOptions.decorationSize = QSize(size, size);
+    }
 
     const int spacing = settings->gridSpacing();
     setGridSize(QSize(itemWidth + spacing, itemHeight + spacing));
 
     const int spacing = settings->gridSpacing();
     setGridSize(QSize(itemWidth + spacing, itemHeight + spacing));