]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/settings/general/previewssettingspage.cpp
Adding license header in kitemlistviewaccessible
[dolphin.git] / src / settings / general / previewssettingspage.cpp
index 4df3fc3783530d39ecc48943331a0e93190c0cfc..38b61b9965f5f9da9727d0fe523ee6deeedf9804 100644 (file)
@@ -59,11 +59,8 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) :
     m_remoteFileSizeBox(0)
 {
     QVBoxLayout* topLayout = new QVBoxLayout(this);
-    topLayout->setSpacing(KDialog::spacingHint());
-    topLayout->setMargin(KDialog::marginHint());
 
-    // Create group box "Show previews for:"
-    QGroupBox* listBox = new QGroupBox(i18nc("@title:group", "Show previews for"), this);
+    QLabel* showPreviewsLabel = new QLabel(i18nc("@title:group", "Show previews for:"), this);
 
     m_listView = new QListView(this);
 
@@ -80,11 +77,6 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) :
     m_listView->setItemDelegate(delegate);
     m_listView->setVerticalScrollMode(QListView::ScrollPerPixel);
 
-    QVBoxLayout* listBoxLayout = new QVBoxLayout(listBox);
-    listBoxLayout->setSpacing(KDialog::spacingHint());
-    listBoxLayout->setMargin(KDialog::marginHint());
-    listBoxLayout->addWidget(m_listView);
-
     QLabel* remoteFileSizeLabel = new QLabel(i18nc("@label", "Skip previews for remote files above:"), this);
 
     m_remoteFileSizeBox = new KIntSpinBox(this);
@@ -96,7 +88,9 @@ PreviewsSettingsPage::PreviewsSettingsPage(QWidget* parent) :
     fileSizeBoxLayout->addWidget(remoteFileSizeLabel, 0, Qt::AlignRight);
     fileSizeBoxLayout->addWidget(m_remoteFileSizeBox);
 
-    topLayout->addWidget(listBox);
+    topLayout->addSpacing(KDialog::spacingHint());
+    topLayout->addWidget(showPreviewsLabel);
+    topLayout->addWidget(m_listView);
     topLayout->addLayout(fileSizeBoxLayout);
 
     loadSettings();
@@ -194,7 +188,7 @@ void PreviewsSettingsPage::loadSettings()
     // Note that the upgrade to the correct plugin is done already in KFilePreviewGenerator. However, if Konqueror is
     // opened in web browsing mode and the Settings dialog is opened, we might end up here before KFilePreviewGenerator's
     // constructor is ever called -> the plugin replacement should be done here as well.
-    if(m_enabledPreviewPlugins.contains(QLatin1String("jpegrotatedthumbnail"))) {
+    if (m_enabledPreviewPlugins.contains(QLatin1String("jpegrotatedthumbnail"))) {
         m_enabledPreviewPlugins.removeAll(QLatin1String("jpegrotatedthumbnail"));
         m_enabledPreviewPlugins.append(QLatin1String("jpegthumbnail"));
         globalConfig.writeEntry("Plugins", m_enabledPreviewPlugins);