From 056d12d60f93a052e19f6e2cff9b826e500eef16 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sat, 11 Feb 2012 18:02:38 +0100 Subject: Group header layout fixes - Don't use a margin for the first group header - Provide margins between the groups - Use a more subtle coloring - Prevent animation glitches when resizing a window --- src/views/dolphinitemlistcontainer.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/views/dolphinitemlistcontainer.cpp') diff --git a/src/views/dolphinitemlistcontainer.cpp b/src/views/dolphinitemlistcontainer.cpp index 544892674..299f32fab 100644 --- a/src/views/dolphinitemlistcontainer.cpp +++ b/src/views/dolphinitemlistcontainer.cpp @@ -206,7 +206,7 @@ void DolphinItemListContainer::updateGridSize() m_zoomLevel = ZoomLevelInfo::zoomLevelForIconSize(QSize(iconSize, iconSize)); KItemListStyleOption styleOption = m_fileItemListView->styleOption(); - const int padding = (iconSize >= KIconLoader::SizeSmallMedium) ? 4 : 2; + int padding = 2; int horizontalMargin = 0; int verticalMargin = 0; @@ -215,7 +215,7 @@ void DolphinItemListContainer::updateGridSize() int itemHeight; switch (itemLayout()) { case KFileItemListView::IconsLayout: { - const int minItemWidth = 64; + const int minItemWidth = 48; itemWidth = minItemWidth + IconsModeSettings::textWidthIndex() * 64; if (previewsShown()) { @@ -231,8 +231,8 @@ void DolphinItemListContainer::updateGridSize() } itemHeight = padding * 3 + iconSize + styleOption.fontMetrics.height(); - horizontalMargin = padding * 2; - verticalMargin = horizontalMargin; + horizontalMargin = 4; + verticalMargin = 8; break; } case KFileItemListView::CompactLayout: { @@ -240,12 +240,13 @@ void DolphinItemListContainer::updateGridSize() const int textLinesCount = m_fileItemListView->visibleRoles().count(); itemHeight = padding * 2 + qMax(iconSize, textLinesCount * styleOption.fontMetrics.height()); - horizontalMargin = padding * 2; + horizontalMargin = 8; break; } case KFileItemListView::DetailsLayout: { itemWidth = -1; itemHeight = padding * 2 + qMax(iconSize, styleOption.fontMetrics.height()); + padding = 3; break; } default: -- cgit v1.3