┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/settings/general
diff options
context:
space:
mode:
authorNathaniel Graham <[email protected]>2018-07-05 21:24:27 -0600
committerNathaniel Graham <[email protected]>2018-07-05 21:24:49 -0600
commit02c94b228a3ad9a5d39e850b9708f1c52c713c57 (patch)
tree2844a36c99cb059208d85c5147dfa6a7be1496f8 /src/settings/general
parent85d7a8a2f60ffac614cc96120181cd8f1c4269b0 (diff)
Modernize Settings window
Summary: This patch modernizes the appearance of Dolphin's configuration window by following the KDE HIG as much as possible and following design cues from Plasma and System Settings. Test Plan: Tested all settings to make sure they still work; they do. Startup page, before: {F5825313} Startup page, after: {F5918574} View page (Icons), before: {F5825319} View page (Icons) after: {F5918575} View page (Compact), before: {F5825321} View page (Compact) after: {F5918700} View page (Detailed), before: {F5825323} View page: (Detailed), after: {F5918701} Navigation page: no change Trash page, before: {F5858748} Trash page, after: {F5866656} (Provided by {D12986}) General page (behavior), before: {F5825316} General page (behavior) after: {F5918572} General page (confirmations), before: {F5866885} General page (confirmations), after: {F5918702} General page (status bar): no change Reviewers: #dolphin, #vdg, broulik, elvisangelaccio Reviewed By: #dolphin, elvisangelaccio Subscribers: fabianr, cfeck, medhefgo, zzag, rkflx, kfm-devel, elvisangelaccio, abetts Tags: #dolphin Differential Revision: https://phabricator.kde.org/D12571
Diffstat (limited to 'src/settings/general')
-rw-r--r--src/settings/general/behaviorsettingspage.cpp70
-rw-r--r--src/settings/general/confirmationssettingspage.cpp8
2 files changed, 43 insertions, 35 deletions
diff --git a/src/settings/general/behaviorsettingspage.cpp b/src/settings/general/behaviorsettingspage.cpp
index ba8d0549c..921ab3f8e 100644
--- a/src/settings/general/behaviorsettingspage.cpp
+++ b/src/settings/general/behaviorsettingspage.cpp
@@ -20,14 +20,16 @@
#include "behaviorsettingspage.h"
+#include "global.h"
#include "views/viewproperties.h"
#include <KLocalizedString>
+#include <QButtonGroup>
#include <QCheckBox>
-#include <QGroupBox>
+#include <QFormLayout>
#include <QRadioButton>
-#include <QVBoxLayout>
+#include <QSpacerItem>
BehaviorSettingsPage::BehaviorSettingsPage(const QUrl& url, QWidget* parent) :
SettingsPageBase(parent),
@@ -42,51 +44,55 @@ BehaviorSettingsPage::BehaviorSettingsPage(const QUrl& url, QWidget* parent) :
m_renameInline(nullptr),
m_useTabForSplitViewSwitch(nullptr)
{
- QVBoxLayout* topLayout = new QVBoxLayout(this);
+ QFormLayout* topLayout = new QFormLayout(this);
+
// View properties
- QGroupBox* viewPropsBox = new QGroupBox(i18nc("@title:group", "View"), this);
- viewPropsBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
+ m_localViewProps = new QRadioButton(i18nc("@option:radio", "Remember properties for each folder"));
+ m_globalViewProps = new QRadioButton(i18nc("@option:radio", "Use common properties for all folders"));
+
+ QButtonGroup* viewGroup = new QButtonGroup(this);
+ viewGroup->addButton(m_localViewProps);
+ viewGroup->addButton(m_globalViewProps);
+ topLayout->addRow(i18nc("@title:group", "View: "), m_localViewProps);
+ topLayout->addRow(QString(), m_globalViewProps);
+
- m_localViewProps = new QRadioButton(i18nc("@option:radio", "Remember properties for each folder"), viewPropsBox);
- m_globalViewProps = new QRadioButton(i18nc("@option:radio", "Use common properties for all folders"), viewPropsBox);
+ topLayout->addItem(new QSpacerItem(0, Dolphin::VERTICAL_SPACER_HEIGHT, QSizePolicy::Fixed, QSizePolicy::Fixed));
- QVBoxLayout* viewPropsLayout = new QVBoxLayout(viewPropsBox);
- viewPropsLayout->addWidget(m_localViewProps);
- viewPropsLayout->addWidget(m_globalViewProps);
// Sorting properties
- QGroupBox* sortingPropsBox = new QGroupBox(i18nc("@title:group", "Sorting Mode"), this);
- sortingPropsBox->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
+ m_naturalSorting = new QRadioButton(i18nc("option:radio", "Natural"));
+ m_caseInsensitiveSorting = new QRadioButton(i18nc("option:radio", "Alphabetical, case insensitive"));
+ m_caseSensitiveSorting = new QRadioButton(i18nc("option:radio", "Alphabetical, case sensitive"));
- m_naturalSorting = new QRadioButton(i18nc("option:radio", "Natural sorting"), sortingPropsBox);
- m_caseInsensitiveSorting = new QRadioButton(i18nc("option:radio", "Alphabetical sorting, case insensitive"), sortingPropsBox);
- m_caseSensitiveSorting = new QRadioButton(i18nc("option:radio", "Alphabetical sorting, case sensitive"), sortingPropsBox);
+ QButtonGroup* sortingModeGroup = new QButtonGroup(this);
+ sortingModeGroup->addButton(m_naturalSorting);
+ sortingModeGroup->addButton(m_caseInsensitiveSorting);
+ sortingModeGroup->addButton(m_caseSensitiveSorting);
+ topLayout->addRow(i18nc("@title:group", "Sorting mode: "), m_naturalSorting);
+ topLayout->addRow(QString(), m_caseInsensitiveSorting);
+ topLayout->addRow(QString(), m_caseSensitiveSorting);
+
+
+ topLayout->addItem(new QSpacerItem(0, Dolphin::VERTICAL_SPACER_HEIGHT, QSizePolicy::Fixed, QSizePolicy::Fixed));
- QVBoxLayout* sortingPropsLayout = new QVBoxLayout(sortingPropsBox);
- sortingPropsLayout->addWidget(m_naturalSorting);
- sortingPropsLayout->addWidget(m_caseInsensitiveSorting);
- sortingPropsLayout->addWidget(m_caseSensitiveSorting);
// 'Show tooltips'
- m_showToolTips = new QCheckBox(i18nc("@option:check", "Show tooltips"), this);
+ m_showToolTips = new QCheckBox(i18nc("@option:check", "Show tooltips"));
+ topLayout->addRow(i18nc("@title:group", "Miscellaneous: "), m_showToolTips);
// 'Show selection marker'
- m_showSelectionToggle = new QCheckBox(i18nc("@option:check", "Show selection marker"), this);
+ m_showSelectionToggle = new QCheckBox(i18nc("@option:check", "Show selection marker"));
+ topLayout->addRow(QString(), m_showSelectionToggle);
// 'Inline renaming of items'
- m_renameInline = new QCheckBox(i18nc("option:check", "Rename inline"), this);
-
- // 'Use tab for switching between right and left split'
- m_useTabForSplitViewSwitch = new QCheckBox(i18nc("option:check", "Use tab for switching between right and left split view"), this);
+ m_renameInline = new QCheckBox(i18nc("option:check", "Rename inline"));
+ topLayout->addRow(QString(), m_renameInline);
- topLayout->addWidget(viewPropsBox);
- topLayout->addWidget(sortingPropsBox);
- topLayout->addWidget(m_showToolTips);
- topLayout->addWidget(m_showSelectionToggle);
- topLayout->addWidget(m_renameInline);
- topLayout->addWidget(m_useTabForSplitViewSwitch);
- topLayout->addStretch();
+ // 'Switch between split views with tab key'
+ m_useTabForSplitViewSwitch = new QCheckBox(i18nc("option:check", "Switch between split views with tab key"));
+ topLayout->addRow(QString(), m_useTabForSplitViewSwitch);
loadSettings();
diff --git a/src/settings/general/confirmationssettingspage.cpp b/src/settings/general/confirmationssettingspage.cpp
index 728d082d2..d96dfe0b2 100644
--- a/src/settings/general/confirmationssettingspage.cpp
+++ b/src/settings/general/confirmationssettingspage.cpp
@@ -20,6 +20,7 @@
#include "confirmationssettingspage.h"
#include "dolphin_generalsettings.h"
+#include "global.h"
#include <KLocalizedString>
@@ -55,17 +56,18 @@ ConfirmationsSettingsPage::ConfirmationsSettingsPage(QWidget* parent) :
m_confirmScriptExecution = new QCheckBox(i18nc("@option:check Ask for confirmation when",
"Executing scripts or desktop files"), this);
- QLabel* confirmLabelDolphin = new QLabel(i18nc("@title:group", "Ask for confirmation when:"), this);
+ QLabel* confirmLabelDolphin = new QLabel(i18nc("@title:group", "Ask for confirmation in Dolphin when:"), this);
confirmLabelDolphin->setWordWrap(true);
- m_confirmClosingMultipleTabs = new QCheckBox(i18nc("@option:check Ask for confirmation when",
- "Closing Dolphin windows with multiple tabs"), this);
+ m_confirmClosingMultipleTabs = new QCheckBox(i18nc("@option:check Ask for confirmation in Dolphin when",
+ "Closing windows with multiple tabs"), this);
topLayout->addWidget(confirmLabelKde);
topLayout->addWidget(m_confirmMoveToTrash);
topLayout->addWidget(m_confirmEmptyTrash);
topLayout->addWidget(m_confirmDelete);
topLayout->addWidget(m_confirmScriptExecution);
+ topLayout->addSpacing(Dolphin::VERTICAL_SPACER_HEIGHT);
topLayout->addWidget(confirmLabelDolphin);
topLayout->addWidget(m_confirmClosingMultipleTabs);
topLayout->addStretch();