From 6613490d8e426c739c1711598a94d5fc7c4192b3 Mon Sep 17 00:00:00 2001 From: Rello Date: Tue, 13 Jan 2026 10:32:30 +0700 Subject: [PATCH 1/9] feat: move settings navigation to left sidebar --- src/gui/settingsdialog.cpp | 23 +++++++++++------------ src/gui/settingsdialog.ui | 4 ++-- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index dc6ab9cb802ca..5bcb74a43fd8b 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -37,7 +37,7 @@ namespace { const QString TOOLBAR_CSS() { - return QStringLiteral("QToolBar { background: %1; margin: 0; padding: 0; border: none; border-bottom: 1px solid %2; spacing: 0; } " + return QStringLiteral("QToolBar { background: %1; margin: 0; padding: 0; border: none; border-right: 1px solid %2; spacing: 0; } " "QToolBar QToolButton { background: %1; border: none; border-bottom: 1px solid %2; margin: 0; padding: 5px; } " "QToolBar QToolBarExtension { padding:0; } " "QToolBar QToolButton:checked { background: %3; color: %4; }"); @@ -81,8 +81,12 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) _ui->setupUi(this); _toolBar = new QToolBar; _toolBar->setIconSize(QSize(32, 32)); - _toolBar->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); - layout()->setMenuBar(_toolBar); + _toolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + _toolBar->setOrientation(Qt::Vertical); + _toolBar->setMovable(false); + _ui->mainLayout->insertWidget(0, _toolBar); + _ui->mainLayout->setStretch(0, 0); + _ui->mainLayout->setStretch(1, 1); // People perceive this as a Window, so also make Ctrl+W work auto *closeWindowAction = new QAction(this); @@ -105,15 +109,10 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) _actionGroup->setExclusive(true); connect(_actionGroup, &QActionGroup::triggered, this, &SettingsDialog::slotSwitchPage); - // Adds space between users + activities and general + network actions - auto *spacer = new QWidget(); - spacer->setMinimumWidth(10); - spacer->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Minimum); - _toolBar->addWidget(spacer); - QAction *generalAction = createColorAwareAction(QLatin1String(":/client/theme/settings.svg"), tr("General")); _actionGroup->addAction(generalAction); _toolBar->addAction(generalAction); + _toolBar->addSeparator(); auto *generalSettings = new GeneralSettings; _ui->stack->addWidget(generalSettings); @@ -234,7 +233,7 @@ void SettingsDialog::accountAdded(AccountState *s) accountAction->setIconText(shortDisplayNameForSettings(s->account().data(), static_cast(height * buttonSizeRatio))); } - _toolBar->insertAction(_toolBar->actions().at(0), accountAction); + _toolBar->addAction(accountAction); auto accountSettings = new AccountSettings(s, this); QString objectName = QLatin1String("accountSettings_"); objectName += s->account()->displayName(); @@ -370,8 +369,8 @@ class ToolButtonAction : public QWidgetAction btn->setObjectName(objectName); btn->setDefaultAction(this); - btn->setToolButtonStyle(Qt::ToolButtonTextUnderIcon); - btn->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding); + btn->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); + btn->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); return btn; } }; diff --git a/src/gui/settingsdialog.ui b/src/gui/settingsdialog.ui index 93d9f9736b89a..7500c8ba9f716 100644 --- a/src/gui/settingsdialog.ui +++ b/src/gui/settingsdialog.ui @@ -13,7 +13,7 @@ Settings - + 0 @@ -29,7 +29,7 @@ 0 - + 0 From 5172072efc96f4b3d90ffd258fc6dfe12686300f Mon Sep 17 00:00:00 2001 From: Rello Date: Tue, 13 Jan 2026 10:38:50 +0700 Subject: [PATCH 2/9] Update FileProviderSettings.qml Signed-off-by: Rello --- src/gui/macOS/ui/FileProviderSettings.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/macOS/ui/FileProviderSettings.qml b/src/gui/macOS/ui/FileProviderSettings.qml index e15b3ec63e2f5..3ffb78fa84f01 100644 --- a/src/gui/macOS/ui/FileProviderSettings.qml +++ b/src/gui/macOS/ui/FileProviderSettings.qml @@ -23,7 +23,7 @@ Page { title: qsTr("Virtual files settings") background: Rectangle { - color: palette.base + color: palette.window border.width: root.showBorder ? Style.normalBorderWidth : 0 border.color: root.palette.dark } From d4c44c21a3d83fac674b8372e101370be7f5d2ff Mon Sep 17 00:00:00 2001 From: Rello Date: Tue, 13 Jan 2026 16:41:35 +0700 Subject: [PATCH 3/9] feat: refine settings sidebar layout --- src/gui/owncloudgui.h | 2 +- src/gui/settingsdialog.cpp | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/gui/owncloudgui.h b/src/gui/owncloudgui.h index 40006a905c190..a57dcab2e2bbc 100644 --- a/src/gui/owncloudgui.h +++ b/src/gui/owncloudgui.h @@ -49,7 +49,7 @@ class ownCloudGui : public QObject bool checkAccountExists(bool openSettings); static void raiseDialog(QWidget *raiseWidget); - static QSize settingsDialogSize() { return {800, 500}; } + static QSize settingsDialogSize() { return {720, 500}; } void setupOverlayIcons(); #ifdef WITH_LIBCLOUDPROVIDERS void setupCloudProviders(); diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index 5bcb74a43fd8b..b4d0a35cb0d32 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -38,7 +38,7 @@ namespace { const QString TOOLBAR_CSS() { return QStringLiteral("QToolBar { background: %1; margin: 0; padding: 0; border: none; border-right: 1px solid %2; spacing: 0; } " - "QToolBar QToolButton { background: %1; border: none; border-bottom: 1px solid %2; margin: 0; padding: 5px; } " + "QToolBar QToolButton { background: %1; border: none; margin: 0; padding: 8px 10px; font-size: 13px; } " "QToolBar QToolBarExtension { padding:0; } " "QToolBar QToolButton:checked { background: %3; color: %4; }"); } @@ -84,6 +84,7 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) _toolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); _toolBar->setOrientation(Qt::Vertical); _toolBar->setMovable(false); + _toolBar->setMinimumWidth(220); _ui->mainLayout->insertWidget(0, _toolBar); _ui->mainLayout->setStretch(0, 0); _ui->mainLayout->setStretch(1, 1); @@ -112,6 +113,9 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) QAction *generalAction = createColorAwareAction(QLatin1String(":/client/theme/settings.svg"), tr("General")); _actionGroup->addAction(generalAction); _toolBar->addAction(generalAction); + auto *accountSpacer = new QWidget(this); + accountSpacer->setFixedHeight(8); + _toolBar->addWidget(accountSpacer); _toolBar->addSeparator(); auto *generalSettings = new GeneralSettings; _ui->stack->addWidget(generalSettings); From 648542027dc1c3944616812095a592adf5a09cdc Mon Sep 17 00:00:00 2001 From: Rello Date: Tue, 13 Jan 2026 17:05:17 +0700 Subject: [PATCH 4/9] Update owncloudgui.h Signed-off-by: Rello --- src/gui/owncloudgui.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/owncloudgui.h b/src/gui/owncloudgui.h index 40006a905c190..a57dcab2e2bbc 100644 --- a/src/gui/owncloudgui.h +++ b/src/gui/owncloudgui.h @@ -49,7 +49,7 @@ class ownCloudGui : public QObject bool checkAccountExists(bool openSettings); static void raiseDialog(QWidget *raiseWidget); - static QSize settingsDialogSize() { return {800, 500}; } + static QSize settingsDialogSize() { return {720, 500}; } void setupOverlayIcons(); #ifdef WITH_LIBCLOUDPROVIDERS void setupCloudProviders(); From bbbfa0aa8894a4c5cd62f892f6939c69eea41e33 Mon Sep 17 00:00:00 2001 From: Rello Date: Tue, 13 Jan 2026 17:08:18 +0700 Subject: [PATCH 5/9] Adjust toolbar button padding and add spacer Signed-off-by: Rello --- src/gui/settingsdialog.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index 5bcb74a43fd8b..b4d0a35cb0d32 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -38,7 +38,7 @@ namespace { const QString TOOLBAR_CSS() { return QStringLiteral("QToolBar { background: %1; margin: 0; padding: 0; border: none; border-right: 1px solid %2; spacing: 0; } " - "QToolBar QToolButton { background: %1; border: none; border-bottom: 1px solid %2; margin: 0; padding: 5px; } " + "QToolBar QToolButton { background: %1; border: none; margin: 0; padding: 8px 10px; font-size: 13px; } " "QToolBar QToolBarExtension { padding:0; } " "QToolBar QToolButton:checked { background: %3; color: %4; }"); } @@ -84,6 +84,7 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) _toolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); _toolBar->setOrientation(Qt::Vertical); _toolBar->setMovable(false); + _toolBar->setMinimumWidth(220); _ui->mainLayout->insertWidget(0, _toolBar); _ui->mainLayout->setStretch(0, 0); _ui->mainLayout->setStretch(1, 1); @@ -112,6 +113,9 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) QAction *generalAction = createColorAwareAction(QLatin1String(":/client/theme/settings.svg"), tr("General")); _actionGroup->addAction(generalAction); _toolBar->addAction(generalAction); + auto *accountSpacer = new QWidget(this); + accountSpacer->setFixedHeight(8); + _toolBar->addWidget(accountSpacer); _toolBar->addSeparator(); auto *generalSettings = new GeneralSettings; _ui->stack->addWidget(generalSettings); From 45b7a2941eee811434b24b3de11f0784a79cdc6d Mon Sep 17 00:00:00 2001 From: Rello Date: Tue, 13 Jan 2026 17:11:16 +0700 Subject: [PATCH 6/9] Add macOS specific stylesheet for tab widget Signed-off-by: Rello --- src/gui/accountsettings.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp index 9d658fa690697..89777d8939aad 100644 --- a/src/gui/accountsettings.cpp +++ b/src/gui/accountsettings.cpp @@ -179,6 +179,12 @@ AccountSettings::AccountSettings(AccountState *accountState, QWidget *parent) const auto delegate = new FolderStatusDelegate; delegate->setParent(this); + #if defined(Q_OS_MACOS) + _ui->tabWidget->setStyleSheet(QStringLiteral( + "QTabWidget { background: palette(window); }" + "QTabWidget::pane { background: palette(window); }")); + #endif + // Connect styleChanged events to our widgets, so they can adapt (Dark-/Light-Mode switching) connect(this, &AccountSettings::styleChanged, delegate, &FolderStatusDelegate::slotStyleChanged); From 57b880c138f608fe64fed490e853034d8d62da26 Mon Sep 17 00:00:00 2001 From: Rello Date: Tue, 13 Jan 2026 19:47:53 +0700 Subject: [PATCH 7/9] feat: soften settings dialog visuals --- src/gui/settingsdialog.cpp | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index b4d0a35cb0d32..d20317978e8a4 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -37,8 +37,8 @@ namespace { const QString TOOLBAR_CSS() { - return QStringLiteral("QToolBar { background: %1; margin: 0; padding: 0; border: none; border-right: 1px solid %2; spacing: 0; } " - "QToolBar QToolButton { background: %1; border: none; margin: 0; padding: 8px 10px; font-size: 13px; } " + return QStringLiteral("QToolBar { background: %1; margin: 0; padding: 0; border: none; spacing: 0; } " + "QToolBar QToolButton { background: %1; border: none; margin: 0; padding: 8px 12px; font-size: 14px; } " "QToolBar QToolBarExtension { padding:0; } " "QToolBar QToolButton:checked { background: %3; color: %4; }"); } @@ -79,15 +79,31 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) ConfigFile cfg; _ui->setupUi(this); + _ui->mainLayout->setContentsMargins(12, 12, 12, 12); + _ui->mainLayout->setSpacing(12); _toolBar = new QToolBar; _toolBar->setIconSize(QSize(32, 32)); _toolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); _toolBar->setOrientation(Qt::Vertical); _toolBar->setMovable(false); _toolBar->setMinimumWidth(220); - _ui->mainLayout->insertWidget(0, _toolBar); + auto *sidebarContainer = new QWidget(this); + sidebarContainer->setObjectName(QLatin1String("settings_sidebar")); + auto *sidebarLayout = new QVBoxLayout(sidebarContainer); + sidebarLayout->setContentsMargins(12, 12, 12, 12); + sidebarLayout->setSpacing(0); + sidebarLayout->addWidget(_toolBar); + _ui->mainLayout->insertWidget(0, sidebarContainer); _ui->mainLayout->setStretch(0, 0); _ui->mainLayout->setStretch(1, 1); + _ui->mainLayout->removeWidget(_ui->stack); + auto *contentContainer = new QWidget(this); + contentContainer->setObjectName(QLatin1String("settings_content")); + auto *contentLayout = new QVBoxLayout(contentContainer); + contentLayout->setContentsMargins(16, 16, 16, 16); + contentLayout->setSpacing(0); + contentLayout->addWidget(_ui->stack); + _ui->mainLayout->insertWidget(1, contentContainer); // People perceive this as a Window, so also make Ctrl+W work auto *closeWindowAction = new QAction(this); @@ -119,6 +135,7 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) _toolBar->addSeparator(); auto *generalSettings = new GeneralSettings; _ui->stack->addWidget(generalSettings); + _ui->stack->setStyleSheet(QStringLiteral("QStackedWidget { background: transparent; }")); // Connect styleChanged events to our widgets, so they can adapt (Dark-/Light-Mode switching) connect(this, &SettingsDialog::styleChanged, generalSettings, &GeneralSettings::slotStyleChanged); @@ -154,6 +171,9 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint & Qt::Window); cfg.restoreGeometry(this); + setStyleSheet(QStringLiteral( + "#Settings { background: #f2f2f2; }" + "#settings_sidebar, #settings_content { background: #e7e7e7; border-radius: 12px; }")); } SettingsDialog::~SettingsDialog() From 52e6180bf6354622ba349d0df6774704346b16e3 Mon Sep 17 00:00:00 2001 From: Rello Date: Tue, 13 Jan 2026 19:48:09 +0700 Subject: [PATCH 8/9] feat: add settings panel styling --- src/gui/accountsettings.ui | 557 +++++++++++++++++++++---------------- src/gui/generalsettings.ui | 2 +- src/gui/settingsdialog.cpp | 39 +-- 3 files changed, 331 insertions(+), 267 deletions(-) diff --git a/src/gui/accountsettings.ui b/src/gui/accountsettings.ui index 2db413221b169..505e7377f7fb2 100644 --- a/src/gui/accountsettings.ui +++ b/src/gui/accountsettings.ui @@ -14,241 +14,138 @@ Form - - - - - - - 0 - 0 - - - - - - - Storage space: … - - - Qt::PlainText - - - false - - - - - - - false - - - - 0 - 0 - - - - - 16777215 - 7 - - - - 100 - - - -1 - - - false - - - - - - - - - - - - - - - 0 - 0 - - - - Unchecked folders will be <b>removed</b> from your local file system and will not be synchronized to this computer anymore - - - Qt::RichText - - - true - - - true - - - - - + + + + QFrame::NoFrame + + + + 12 + + + 12 + + + 12 + + + 12 + - - - - 0 - - - 0 - - - 0 - - - 0 - - - + + + + - + 0 0 - Cancel + - - + + - + 0 0 - Apply + Connected with <server> as <user> + + + Qt::RichText + + + true + + + true - - - - - - - - - - - 0 - 0 - - - - - - - - - - - - 0 - 0 - - - - Connected with <server> as <user> - - - Qt::RichText - - - true - - - true - - + + - - - - - + + + QFrame::NoFrame + + - 0 + 12 - 0 + 12 - 0 + 12 - 0 + 12 - - - color: red - - - - - - true - - - - - + - - - Qt::Horizontal + + + + 0 + 0 + - - - 40 - 20 - + + - - - - - Synchronize all + Storage space: … - - - - - - Synchronize none + + Qt::PlainText + + + false - - - Apply manual changes + + + false + + + + 0 + 0 + + + + + 16777215 + 7 + + + + 100 + + + -1 + + + false @@ -257,68 +154,234 @@ - - - - QTabWidget::Rounded - - - 0 + + + + QFrame::NoFrame - - - Standard file sync - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - Qt::CustomContextMenu - - - false + + + 12 + + + 12 + + + 12 + + + 12 + + + + + QTabWidget::Rounded + + + 0 + + + + Standard file sync + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + Qt::CustomContextMenu + + + false + + + QFrame::Shape::NoFrame + + + QAbstractItemView::NoEditTriggers + + + true + + + + + + + + Virtual file sync + + + + + Connection settings + + + + + + + + + + + + + + 0 + 0 + + + + Unchecked folders will be <b>removed</b> from your local file system and will not be synchronized to this computer anymore + + + Qt::RichText + + + true + + + true + + + + + + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + Cancel + + + + + + + + 0 + 0 + + + + Apply + + + + + + + + + + + + + + 0 - - QFrame::Shape::NoFrame + + 0 - - QAbstractItemView::NoEditTriggers + + 0 - - true + + 0 - - - - - - - Virtual file sync - - - - - Connection settings - - + + + + color: red + + + + + + true + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Synchronize all + + + + + + + Synchronize none + + + + + + + Apply manual changes + + + + + + + + + diff --git a/src/gui/generalsettings.ui b/src/gui/generalsettings.ui index b26f433ed2653..7cb2d893cd7eb 100644 --- a/src/gui/generalsettings.ui +++ b/src/gui/generalsettings.ui @@ -69,7 +69,7 @@ - + Advanced diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index d20317978e8a4..e08b78d174c44 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -80,30 +80,24 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) _ui->setupUi(this); _ui->mainLayout->setContentsMargins(12, 12, 12, 12); - _ui->mainLayout->setSpacing(12); + _ui->mainLayout->setSpacing(0); _toolBar = new QToolBar; _toolBar->setIconSize(QSize(32, 32)); _toolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); _toolBar->setOrientation(Qt::Vertical); _toolBar->setMovable(false); _toolBar->setMinimumWidth(220); - auto *sidebarContainer = new QWidget(this); - sidebarContainer->setObjectName(QLatin1String("settings_sidebar")); - auto *sidebarLayout = new QVBoxLayout(sidebarContainer); - sidebarLayout->setContentsMargins(12, 12, 12, 12); - sidebarLayout->setSpacing(0); - sidebarLayout->addWidget(_toolBar); - _ui->mainLayout->insertWidget(0, sidebarContainer); - _ui->mainLayout->setStretch(0, 0); - _ui->mainLayout->setStretch(1, 1); + auto *shellContainer = new QWidget(this); + shellContainer->setObjectName(QLatin1String("settings_shell")); + auto *shellLayout = new QHBoxLayout(shellContainer); + shellLayout->setContentsMargins(12, 12, 12, 12); + shellLayout->setSpacing(12); + shellLayout->addWidget(_toolBar); + shellLayout->addWidget(_ui->stack); + shellLayout->setStretch(0, 0); + shellLayout->setStretch(1, 1); _ui->mainLayout->removeWidget(_ui->stack); - auto *contentContainer = new QWidget(this); - contentContainer->setObjectName(QLatin1String("settings_content")); - auto *contentLayout = new QVBoxLayout(contentContainer); - contentLayout->setContentsMargins(16, 16, 16, 16); - contentLayout->setSpacing(0); - contentLayout->addWidget(_ui->stack); - _ui->mainLayout->insertWidget(1, contentContainer); + _ui->mainLayout->insertWidget(0, shellContainer); // People perceive this as a Window, so also make Ctrl+W work auto *closeWindowAction = new QAction(this); @@ -132,7 +126,6 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) auto *accountSpacer = new QWidget(this); accountSpacer->setFixedHeight(8); _toolBar->addWidget(accountSpacer); - _toolBar->addSeparator(); auto *generalSettings = new GeneralSettings; _ui->stack->addWidget(generalSettings); _ui->stack->setStyleSheet(QStringLiteral("QStackedWidget { background: transparent; }")); @@ -173,7 +166,15 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) cfg.restoreGeometry(this); setStyleSheet(QStringLiteral( "#Settings { background: #f2f2f2; }" - "#settings_sidebar, #settings_content { background: #e7e7e7; border-radius: 12px; }")); + "#settings_shell { background: #e7e7e7; border-radius: 12px; }" + "#generalGroupBox, #advancedGroupBox, #aboutAndUpdatesGroupBox," + "#accountStatusPanel, #accountStoragePanel, #accountTabsPanel {" + " background: #f2f2f2; border-radius: 10px; border: none; }" + "#generalGroupBox, #advancedGroupBox, #aboutAndUpdatesGroupBox {" + " margin-top: 8px; padding: 12px; }" + "#generalGroupBox::title, #advancedGroupBox::title, #aboutAndUpdatesGroupBox::title {" + " subcontrol-origin: margin; left: 12px; top: 6px; padding: 0 4px; }" + "#accountStatusPanel, #accountStoragePanel, #accountTabsPanel { padding: 12px; }")); } SettingsDialog::~SettingsDialog() From 8d0f7585480a0b397f57f5507eefeeb4dafe02e6 Mon Sep 17 00:00:00 2001 From: Rello Date: Wed, 14 Jan 2026 11:52:17 +0700 Subject: [PATCH 9/9] fix: adjust settings dialog layout --- src/gui/settingsdialog.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index e08b78d174c44..53f944e392c50 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -37,10 +37,10 @@ namespace { const QString TOOLBAR_CSS() { - return QStringLiteral("QToolBar { background: %1; margin: 0; padding: 0; border: none; spacing: 0; } " - "QToolBar QToolButton { background: %1; border: none; margin: 0; padding: 8px 12px; font-size: 14px; } " + return QStringLiteral("QToolBar { background: transparent; margin: 0; padding: 0; border: none; spacing: 0; } " + "QToolBar QToolButton { background: transparent; border: none; margin: 0; padding: 8px 12px; font-size: 14px; } " "QToolBar QToolBarExtension { padding:0; } " - "QToolBar QToolButton:checked { background: %3; color: %4; }"); + "QToolBar QToolButton:checked { background: %3; color: %4; border-radius: 8px; margin: 4px 8px; }"); } const float buttonSizeRatio = 1.618f; // golden ratio @@ -92,7 +92,13 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) auto *shellLayout = new QHBoxLayout(shellContainer); shellLayout->setContentsMargins(12, 12, 12, 12); shellLayout->setSpacing(12); - shellLayout->addWidget(_toolBar); + auto *navigationContainer = new QWidget(this); + navigationContainer->setObjectName(QLatin1String("settings_navigation")); + auto *navigationLayout = new QVBoxLayout(navigationContainer); + navigationLayout->setContentsMargins(0, 0, 0, 0); + navigationLayout->setSpacing(0); + navigationLayout->addWidget(_toolBar); + shellLayout->addWidget(navigationContainer); shellLayout->addWidget(_ui->stack); shellLayout->setStretch(0, 0); shellLayout->setStretch(1, 1); @@ -166,7 +172,8 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent) cfg.restoreGeometry(this); setStyleSheet(QStringLiteral( "#Settings { background: #f2f2f2; }" - "#settings_shell { background: #e7e7e7; border-radius: 12px; }" + "#settings_shell { background: transparent; border-radius: 0; }" + "#settings_navigation { background: #e7e7e7; border-radius: 12px; }" "#generalGroupBox, #advancedGroupBox, #aboutAndUpdatesGroupBox," "#accountStatusPanel, #accountStoragePanel, #accountTabsPanel {" " background: #f2f2f2; border-radius: 10px; border: none; }"