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);
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/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
}
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 dc6ab9cb802ca..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; border-bottom: 1px solid %2; spacing: 0; } "
- "QToolBar QToolButton { background: %1; border: none; border-bottom: 1px solid %2; margin: 0; padding: 5px; } "
+ 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
@@ -79,10 +79,31 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent)
ConfigFile cfg;
_ui->setupUi(this);
+ _ui->mainLayout->setContentsMargins(12, 12, 12, 12);
+ _ui->mainLayout->setSpacing(0);
_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);
+ _toolBar->setMinimumWidth(220);
+ auto *shellContainer = new QWidget(this);
+ shellContainer->setObjectName(QLatin1String("settings_shell"));
+ auto *shellLayout = new QHBoxLayout(shellContainer);
+ shellLayout->setContentsMargins(12, 12, 12, 12);
+ shellLayout->setSpacing(12);
+ 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);
+ _ui->mainLayout->removeWidget(_ui->stack);
+ _ui->mainLayout->insertWidget(0, shellContainer);
// People perceive this as a Window, so also make Ctrl+W work
auto *closeWindowAction = new QAction(this);
@@ -105,17 +126,15 @@ 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);
+ auto *accountSpacer = new QWidget(this);
+ accountSpacer->setFixedHeight(8);
+ _toolBar->addWidget(accountSpacer);
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);
@@ -151,6 +170,18 @@ SettingsDialog::SettingsDialog(ownCloudGui *gui, QWidget *parent)
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint & Qt::Window);
cfg.restoreGeometry(this);
+ setStyleSheet(QStringLiteral(
+ "#Settings { background: #f2f2f2; }"
+ "#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; }"
+ "#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()
@@ -234,7 +265,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 +401,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