┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/iconsviewsettingspage.cpp
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2007-05-10 20:29:10 +0000
committerPeter Penz <[email protected]>2007-05-10 20:29:10 +0000
commitd03b27f28850e25d087f946e3a5c99b21c76f359 (patch)
tree27cf913e6d10347df34f7172f4a128bd6246835b /src/iconsviewsettingspage.cpp
parent6ab84fbd6129422dfa59c095087c7ceb1a9e1e50 (diff)
layout improvements in the icons view:
* do a text wrapping if the number of lines is > 1 (TODO: bugfix of KFileItemDelegate necessary, currently the text might overlap with the icon) * increase the height for the text area if an additional information like type, date, ... is shown svn path=/trunk/KDE/kdebase/apps/; revision=663320
Diffstat (limited to 'src/iconsviewsettingspage.cpp')
-rw-r--r--src/iconsviewsettingspage.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/iconsviewsettingspage.cpp b/src/iconsviewsettingspage.cpp
index 3bba6f12f..2cd56043f 100644
--- a/src/iconsviewsettingspage.cpp
+++ b/src/iconsviewsettingspage.cpp
@@ -161,13 +161,15 @@ void IconsViewSettingsPage::applySettings()
QListView::TopToBottom;
settings->setArrangement(arrangement);
+ const int numberOfTextlines = m_textlinesCountBox->value();
+
const int defaultSize = settings->iconSize();
int gridWidth = defaultSize;
int gridHeight = defaultSize;
const int textSizeIndex = m_textWidthBox->currentIndex();
if (arrangement == QListView::TopToBottom) {
gridWidth += TopToBottomBase + textSizeIndex * TopToBottomInc;
- gridHeight += fontSize * 6;
+ gridHeight += fontSize * (2 + numberOfTextlines);
} else {
gridWidth += LeftToRightBase + textSizeIndex * LeftToRightInc;
}
@@ -180,7 +182,7 @@ void IconsViewSettingsPage::applySettings()
settings->setItalicFont(font.italic());
settings->setBoldFont(font.bold());
- settings->setNumberOfTextlines(m_textlinesCountBox->value());
+ settings->setNumberOfTextlines(numberOfTextlines);
settings->setGridSpacing(GridSpacingBase +
m_gridSpacingBox->currentIndex() * GridSpacingInc);