From 03415d90783979f8e51880b7950721985fee29bf Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Wed, 8 Feb 2012 17:45:22 +0100 Subject: Layout optimizations - Differ internally between margins and paddings - Add a small padding in the icons-view and the compact-views - Optimize the width of the icons-view if previews are shown --- src/panels/folders/folderspanel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/panels/folders/folderspanel.cpp') diff --git a/src/panels/folders/folderspanel.cpp b/src/panels/folders/folderspanel.cpp index 1a5e9c62d..cc7c75f96 100644 --- a/src/panels/folders/folderspanel.cpp +++ b/src/panels/folders/folderspanel.cpp @@ -144,12 +144,12 @@ void FoldersPanel::showEvent(QShowEvent* event) view->setWidgetCreator(new KItemListWidgetCreator()); KItemListStyleOption styleOption = view->styleOption(); - styleOption.margin = 2; + styleOption.padding = 2; styleOption.iconSize = KIconLoader::SizeSmall; view->setStyleOption(styleOption); const qreal itemHeight = qMax(int(KIconLoader::SizeSmall), styleOption.fontMetrics.height()); - view->setItemSize(QSizeF(-1, itemHeight + 2 * styleOption.margin)); + view->setItemSize(QSizeF(-1, itemHeight + 2 * styleOption.padding)); view->setItemLayout(KFileItemListView::DetailsLayout); // Set the opacity to 0 initially. The opacity will be increased after the loading of the initial tree // has been finished in slotLoadingCompleted(). This prevents an unnecessary animation-mess when -- cgit v1.3