+ const bool leftToRightArrangement = (settings->arrangement() == QListView::LeftToRight);
+ int textWidthIndex = 0;
+ const int remainingWidth = settings->gridWidth() - settings->iconSize();
+ if (leftToRightArrangement) {
+ textWidthIndex = (remainingWidth - LeftToRightBase) / LeftToRightInc;
+ }
+ else {
+ textWidthIndex = (remainingWidth - TopToBottomBase) / TopToBottomInc;
+ }
+
+ m_textWidthBox->setCurrentIndex(textWidthIndex);
+
+ QGridLayout* textGroupLayout = new QGridLayout(textGroup);
+ textGroupLayout->addWidget(fontLabel, 0, 0);
+ textGroupLayout->addWidget(m_fontRequester, 0, 1);
+ textGroupLayout->addWidget(textlinesCountLabel, 1, 0);
+ textGroupLayout->addWidget(m_textlinesCountBox, 1, 1);
+ textGroupLayout->addWidget(textWidthLabel, 2, 0);
+ textGroupLayout->addWidget(m_textWidthBox, 2, 1);
+
+ // create the 'Grid' group for selecting the arrangement and the grid spacing
+ QGroupBox* gridGroup = new QGroupBox(i18n("Grid"), this);