diff options
| author | Peter Penz <[email protected]> | 2012-02-08 17:45:22 +0100 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2012-02-08 17:48:32 +0100 |
| commit | 03415d90783979f8e51880b7950721985fee29bf (patch) | |
| tree | 2e38e2cddbc293f1fa3be44729a079bf03d4ec45 /src/panels/folders/folderspanel.cpp | |
| parent | 3c83d8f14defbec5f09aeeb78de3885535d2dc71 (diff) | |
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
Diffstat (limited to 'src/panels/folders/folderspanel.cpp')
| -rw-r--r-- | src/panels/folders/folderspanel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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<KFileItemListWidget>()); 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 |
