diff options
| author | Méven Car <[email protected]> | 2024-05-07 18:43:16 +0200 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2024-05-07 18:49:43 +0200 |
| commit | 2c5e15aa5a090e73bda6320c1a0de9005666257d (patch) | |
| tree | 4fa0bdb8809530bd0b694714baafaa295fbf70a5 /src/settings/interface | |
| parent | 69bc1cff51e8565b6c6d04b5598cfbdc670b873d (diff) | |
settings: use QFormLayout for confirmation tab
For consistency.
Diffstat (limited to 'src/settings/interface')
| -rw-r--r-- | src/settings/interface/confirmationssettingspage.cpp | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/src/settings/interface/confirmationssettingspage.cpp b/src/settings/interface/confirmationssettingspage.cpp index c43ff0474..ec63cbb67 100644 --- a/src/settings/interface/confirmationssettingspage.cpp +++ b/src/settings/interface/confirmationssettingspage.cpp @@ -13,9 +13,8 @@ #include <QCheckBox> #include <QComboBox> -#include <QHBoxLayout> +#include <QFormLayout> #include <QLabel> -#include <QVBoxLayout> namespace { @@ -41,7 +40,7 @@ ConfirmationsSettingsPage::ConfirmationsSettingsPage(QWidget *parent) m_confirmClosingMultipleTabs(nullptr) { - QVBoxLayout *topLayout = new QVBoxLayout(this); + QFormLayout *topLayout = new QFormLayout(this); QLabel *confirmLabelKde = new QLabel(i18nc("@title:group", "Ask for confirmation in all KDE applications when:"), this); confirmLabelKde->setWordWrap(true); @@ -63,34 +62,30 @@ ConfirmationsSettingsPage::ConfirmationsSettingsPage(QWidget *parent) m_confirmOpenManyFolders = new QCheckBox(i18nc("@option:check Ask for confirmation in Dolphin when", "Opening many folders at once"), this); m_confirmOpenManyTerminals = new QCheckBox(i18nc("@option:check Ask for confirmation in Dolphin when", "Opening many terminals at once"), this); - QHBoxLayout *executableScriptLayout = new QHBoxLayout(); QLabel *executableScriptLabel = new QLabel(i18nc("@title:group", "When opening an executable file:"), this); executableScriptLabel->setWordWrap(true); - executableScriptLayout->addWidget(executableScriptLabel); m_confirmScriptExecution = new QComboBox(this); m_confirmScriptExecution->addItems({i18n("Always ask"), i18n("Open in application"), i18n("Run script")}); - executableScriptLayout->addWidget(m_confirmScriptExecution); - topLayout->addWidget(confirmLabelKde); - topLayout->addWidget(m_confirmMoveToTrash); - topLayout->addWidget(m_confirmEmptyTrash); - topLayout->addWidget(m_confirmDelete); - topLayout->addSpacing(Dolphin::VERTICAL_SPACER_HEIGHT); - topLayout->addWidget(confirmLabelDolphin); - topLayout->addWidget(m_confirmClosingMultipleTabs); + topLayout->addRow(confirmLabelKde); + topLayout->addRow(nullptr, m_confirmMoveToTrash); + topLayout->addRow(nullptr, m_confirmEmptyTrash); + topLayout->addRow(nullptr, m_confirmDelete); + + topLayout->addItem(new QSpacerItem(0, Dolphin::VERTICAL_SPACER_HEIGHT, QSizePolicy::Fixed, QSizePolicy::Fixed)); + topLayout->addRow(confirmLabelDolphin); + topLayout->addRow(nullptr, m_confirmClosingMultipleTabs); #if HAVE_TERMINAL - topLayout->addWidget(m_confirmClosingTerminalRunningProgram); + topLayout->addRow(nullptr, m_confirmClosingTerminalRunningProgram); #endif - topLayout->addWidget(m_confirmOpenManyFolders); - topLayout->addWidget(m_confirmOpenManyTerminals); - - topLayout->addSpacing(Dolphin::VERTICAL_SPACER_HEIGHT); - topLayout->addLayout(executableScriptLayout); + topLayout->addRow(nullptr, m_confirmOpenManyFolders); + topLayout->addRow(nullptr, m_confirmOpenManyTerminals); - topLayout->addStretch(); + topLayout->addItem(new QSpacerItem(0, Dolphin::VERTICAL_SPACER_HEIGHT, QSizePolicy::Fixed, QSizePolicy::Fixed)); + topLayout->addRow(executableScriptLabel, m_confirmScriptExecution); loadSettings(); |
