diff options
| author | Peter Penz <[email protected]> | 2010-05-04 17:08:39 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2010-05-04 17:08:39 +0000 |
| commit | d8c96257836c56994e6b402a3908be9ab01af36e (patch) | |
| tree | cfe413e5c9ebe5b24eb72566efb259850a801305 /src/settings | |
| parent | 2aa41e71676a7fa9e745a4bd9b1d0fb372ad65e3 (diff) | |
Provide a cleaner layout and better description about the maximum file size setting.
BUG: 230818
svn path=/trunk/KDE/kdebase/apps/; revision=1122775
Diffstat (limited to 'src/settings')
| -rw-r--r-- | src/settings/previewssettingspage.cpp | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/src/settings/previewssettingspage.cpp b/src/settings/previewssettingspage.cpp index 7f8b26b50..0e89d16c9 100644 --- a/src/settings/previewssettingspage.cpp +++ b/src/settings/previewssettingspage.cpp @@ -58,7 +58,8 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) : topLayout->setSpacing(KDialog::spacingHint()); topLayout->setMargin(KDialog::marginHint()); - QLabel* listDescription = new QLabel(i18nc("@label", "Show previews for:"), this); + // Create group box "Show previews for:" + QGroupBox* listBox = new QGroupBox(i18nc("@title:group", "Show previews for:"), this); m_previewPluginsList = new QListWidget(this); m_previewPluginsList->setSortingEnabled(true); @@ -66,7 +67,14 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) : connect(m_previewPluginsList, SIGNAL(itemClicked(QListWidgetItem*)), this, SIGNAL(changed())); - QLabel* localFileSizeLabel = new QLabel(i18nc("@label", "Local file size maximum:"), this); + QVBoxLayout* listBoxLayout = new QVBoxLayout(listBox); + listBoxLayout->addWidget(m_previewPluginsList); + + // Create group box "Don't create previews for" + QGroupBox* fileSizeBox = new QGroupBox(i18nc("@title:group", "Don't create previews for:"), this); + + QLabel* localFileSizeLabel = new QLabel(i18nc("@label Don't create previews for: <Local files above:> XX MByte", + "Local files above:"), this); m_localFileSizeBox = new KIntSpinBox(this); m_localFileSizeBox->setSingleStep(1); @@ -75,7 +83,9 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) : connect(m_localFileSizeBox, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); - QLabel* remoteFileSizeLabel = new QLabel(i18nc("@label", "Remote file size maximum:"), this); + QLabel* remoteFileSizeLabel = new QLabel(i18nc("@label Don't create previews for: <Remote files above:> XX MByte", + "Remote files above:"), this); + m_remoteFileSizeBox = new KIntSpinBox(this); m_remoteFileSizeBox->setSingleStep(1); m_remoteFileSizeBox->setSuffix(QLatin1String(" MB")); @@ -83,15 +93,14 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) : connect(m_remoteFileSizeBox, SIGNAL(valueChanged(int)), this, SIGNAL(changed())); - QGridLayout* gridLayout = new QGridLayout(); - gridLayout->addWidget(localFileSizeLabel, 0, 0); - gridLayout->addWidget(m_localFileSizeBox, 0, 1); - gridLayout->addWidget(remoteFileSizeLabel, 1, 0); - gridLayout->addWidget(m_remoteFileSizeBox, 1, 1); + QGridLayout* fileSizeBoxLayout = new QGridLayout(fileSizeBox); + fileSizeBoxLayout->addWidget(localFileSizeLabel, 0, 0, Qt::AlignRight); + fileSizeBoxLayout->addWidget(m_localFileSizeBox, 0, 1); + fileSizeBoxLayout->addWidget(remoteFileSizeLabel, 1, 0, Qt::AlignRight); + fileSizeBoxLayout->addWidget(m_remoteFileSizeBox, 1, 1); - topLayout->addWidget(listDescription); - topLayout->addWidget(m_previewPluginsList); - topLayout->addLayout(gridLayout); + topLayout->addWidget(listBox); + topLayout->addWidget(fileSizeBox); loadSettings(); } |
