From 51e719086cd3a8f383292203293e8e4227e2af8b Mon Sep 17 00:00:00 2001 From: memurats Date: Fri, 24 Oct 2025 11:52:03 +0200 Subject: [PATCH 01/10] main settings dialog changes --- src/gui/CMakeLists.txt | 7 ++ src/gui/nmcgui/nmcsettingsdialog.cpp | 96 ++++++++++++++++++++++++++++ src/gui/nmcgui/nmcsettingsdialog.h | 70 ++++++++++++++++++++ src/gui/owncloudgui.cpp | 3 +- src/gui/settingsdialog.cpp | 7 +- src/gui/settingsdialog.h | 10 ++- theme/account.svg | 12 ++-- theme/network.svg | 8 ++- theme/settings.svg | 12 ++-- 9 files changed, 207 insertions(+), 18 deletions(-) create mode 100644 src/gui/nmcgui/nmcsettingsdialog.cpp create mode 100644 src/gui/nmcgui/nmcsettingsdialog.h diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index b68e5fd9287e4..05b7d3143899d 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -6,6 +6,9 @@ find_package(Qt${QT_MAJOR_VERSION} REQUIRED COMPONENTS Widgets Svg Qml Quick Qui find_package(KF6Archive REQUIRED) find_package(KF6GuiAddons) +#NMC customization: needed to find the ui file in a different location than the header file +set(CMAKE_AUTOUIC_SEARCH_PATHS "${CMAKE_SOURCE_DIR}/src/gui") + if(CMAKE_BUILD_TYPE MATCHES Debug) add_definitions(-DQT_QML_DEBUG) endif() @@ -248,6 +251,10 @@ set(client_SRCS integration/fileactionsmodel.cpp ) +file(GLOB NMC_FILES "nmcgui/*") +set(NMC_SRCS ${NMC_FILES}) +list(APPEND client_SRCS ${NMC_SRCS}) + if (NOT DISABLE_ACCOUNT_MIGRATION) list(APPEND client_SRCS legacyaccountselectiondialog.h diff --git a/src/gui/nmcgui/nmcsettingsdialog.cpp b/src/gui/nmcgui/nmcsettingsdialog.cpp new file mode 100644 index 0000000000000..2ed349e7f1018 --- /dev/null +++ b/src/gui/nmcgui/nmcsettingsdialog.cpp @@ -0,0 +1,96 @@ +/* + * Copyright (C) by Eugen Fischer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +#include "nmcsettingsdialog.h" +#include +#include +#include +#include "settingsdialog.h" + +namespace OCC { + +NMCSettingsDialog::NMCSettingsDialog(ownCloudGui *gui, QWidget *parent) + : SettingsDialog(gui, parent) +{ + setLayout(); + + // The window has no background widget, use palette + // QPalette palette; + // palette.setColor(QPalette::Window, QColor("#F3f3f3")); + // setPalette(palette); + + setFixedSize(760,760); + + getToolBar()->setFixedHeight(92); // 76px button height + 8 + 8 margin top and bottom + getToolBar()->setContentsMargins(8, 0, 8, 0); // Left margin not accepted, Qt bug? +} + +void NMCSettingsDialog::slotAccountAvatarChanged() +{ + //Intercept the base class slot, so the round avatar is not set. (dont pass to base class) + //Fix Account button size, for ech new created account + fixAccountButton(); +} + +void OCC::NMCSettingsDialog::setLayout() const +{ + //Fix network and general settings button size + const auto actions = getToolBar()->actions(); + for(auto *action : actions) + { + if((action->text() == QCoreApplication::translate("OCC::SettingsDialog","General") || action->text() == QCoreApplication::tr("General")) || + (action->text() == QCoreApplication::translate("OCC::SettingsDialog","Network") || action->text() == QCoreApplication::tr("Network")) || + (action->text() == QCoreApplication::translate("OCC::SettingsDialog","Account") || action->text() == QCoreApplication::tr("Account"))) + { + auto *widget = getToolBar()->widgetForAction(action); + if(widget) + { + widget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + widget->setFixedSize(76, 76); + } + } + } + + //Fix initial account button size and stylesheet + fixAccountButton(); +} + +void NMCSettingsDialog::fixAccountButton() const +{ + auto toolbar = getToolBar(); + + // Sicher prüfen, ob ein Spacer schon existiert + auto *firstAction = toolbar->actions().at(0); + auto *firstWidget = toolbar->widgetForAction(firstAction); + if (!firstWidget || !firstWidget->objectName().startsWith("spacer_left")) { + auto *spacer = new QWidget(toolbar); + spacer->setFixedWidth(16); + spacer->setObjectName("spacer_left"); + spacer->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding); + toolbar->insertWidget(firstAction, spacer); + } + + // Account-Button anpassen + if (toolbar->actions().size() > 1) { + auto action = toolbar->actions().at(1); // Index 1, da davor Spacer + auto *widget = toolbar->widgetForAction(action); + if(widget) + { + widget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + widget->setFixedSize(152, 76); + } + } +} + +} // namespace OCC diff --git a/src/gui/nmcgui/nmcsettingsdialog.h b/src/gui/nmcgui/nmcsettingsdialog.h new file mode 100644 index 0000000000000..2e917e809d8f6 --- /dev/null +++ b/src/gui/nmcgui/nmcsettingsdialog.h @@ -0,0 +1,70 @@ +/* + * Copyright (C) by Eugen Fischer + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + */ + +#ifndef MIRALL_SETTINGSDIALOGMAGENTA_H +#define MIRALL_SETTINGSDIALOGMAGENTA_H + +#include + +namespace OCC { + +/** + * @brief The NMCSettingsDialog class + * + * This class represents the settings dialog specific to the Magenta theme. + * It inherits from SettingsDialog and provides additional functionalities + * or customizations related to the Magenta theme. + * + * @ingroup gui + */ +class NMCSettingsDialog : public SettingsDialog +{ + Q_OBJECT + +public: + /** + * @brief Constructor for NMCSettingsDialog + * + * @param gui Pointer to the ownCloudGui instance. + * @param parent Pointer to the parent QWidget (default is nullptr). + */ + explicit NMCSettingsDialog(ownCloudGui *gui, QWidget *parent = nullptr); + + /** + * @brief Destructor for NMCSettingsDialog + */ + ~NMCSettingsDialog() = default; + +public slots: + /** + * @brief Slot for handling changes in the account avatar + */ + void slotAccountAvatarChanged(); + + // NMCGuiInterface interface +protected: + /** + * @brief Sets the layout for the NMCSettingsDialog + */ + void setLayout() const; + +private: + /** + * @brief Fixes the appearance of the account button + */ + void fixAccountButton() const; +}; + +} // namespace OCC +#endif // MIRALL_SETTINGSDIALOGMAGENTA_H diff --git a/src/gui/owncloudgui.cpp b/src/gui/owncloudgui.cpp index 1fcda11fb55b9..22eb4d61ca89e 100644 --- a/src/gui/owncloudgui.cpp +++ b/src/gui/owncloudgui.cpp @@ -22,6 +22,7 @@ #include "owncloudsetupwizard.h" #include "progressdispatcher.h" #include "settingsdialog.h" +#include "nmcgui/nmcsettingsdialog.h" #include "theme.h" #include "wheelhandler.h" #include "syncconflictsmodel.h" @@ -650,7 +651,7 @@ void ownCloudGui::slotShowGuiMessage(const QString &title, const QString &messag void ownCloudGui::slotShowSettings() { if (_settingsDialog.isNull()) { - _settingsDialog = new SettingsDialog(this); + _settingsDialog = new NMCSettingsDialog(this); _settingsDialog->setAttribute(Qt::WA_DeleteOnClose, true); #ifdef Q_OS_MACOS diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index fb66182fab055..5c3c05abcd4ae 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -5,6 +5,8 @@ */ #include "settingsdialog.h" +#include "ui_settingsdialog.h" +#include "QtWidgets/qmainwindow.h" #include "advancedsettings.h" #include "folderman.h" @@ -133,7 +135,7 @@ QString shortDisplayNameForSettings(OCC::Account *account, int width) host = fm.elidedText(host, Qt::ElideMiddle, width); user = fm.elidedText(user, Qt::ElideRight, width); } - return QStringLiteral("%1\n%2").arg(user, host); + return QStringLiteral("%1").arg(user); } } @@ -337,7 +339,7 @@ void SettingsDialog::accountAdded(AccountState *s) updateAccountAvatar(s->account().data()); if (!brandingSingleAccount) { - accountAction->setToolTip(s->account()->displayName()); + accountAction->setToolTip(shortDisplayNameForSettings(s->account().data(), static_cast(height * buttonSizeRatio))); accountAction->setIconText(shortDisplayNameForSettings(s->account().data(), static_cast(height * buttonSizeRatio))); } @@ -412,6 +414,7 @@ void SettingsDialog::slotAccountDisplayNameChanged() QString displayName = account->displayName(); action->setText(displayName); auto height = _toolBar->sizeHint().height(); + action->setToolTip(shortDisplayNameForSettings(account, static_cast(height * buttonSizeRatio))); action->setIconText(shortDisplayNameForSettings(account, static_cast(height * buttonSizeRatio))); } } diff --git a/src/gui/settingsdialog.h b/src/gui/settingsdialog.h index e975e204946c0..0a478f4a9e51f 100644 --- a/src/gui/settingsdialog.h +++ b/src/gui/settingsdialog.h @@ -43,13 +43,18 @@ class SettingsDialog : public QDialog QWidget* currentPage(); + QToolBar *getToolBar() const + { + return _toolBar; + } + public slots: void showFirstPage(); void showAccount(OCC::AccountState *account); void setInitialAccount(OCC::AccountState *account); void showIssuesList(OCC::AccountState *account); void slotSwitchPage(QAction *action); - void slotAccountAvatarChanged(); + virtual void slotAccountAvatarChanged(); void slotAccountDisplayNameChanged(); signals: @@ -67,12 +72,13 @@ private slots: void accountAdded(OCC::AccountState *); void accountRemoved(OCC::AccountState *); -private: +protected: void customizeStyle(); void requestStyleUpdate(); void updateAccountAvatar(const Account *account); void addSettingsPage(const QString &iconPath, const QString &title, QWidget *settingsPage, bool updateChannelAware = false); +private: QAction *createColorAwareAction(const QString &iconName, const QString &fileName); QAction *createActionWithIcon(const QIcon &icon, const QString &text, const QString &iconPath = QString()); diff --git a/theme/account.svg b/theme/account.svg index 8168da5fa5ee5..bde174912436d 100644 --- a/theme/account.svg +++ b/theme/account.svg @@ -1,7 +1,7 @@ - - - - - + + + icon/user_file/user/default@svg + + - + \ No newline at end of file diff --git a/theme/network.svg b/theme/network.svg index ca6455df5b41e..2f9e7bdf3cc61 100644 --- a/theme/network.svg +++ b/theme/network.svg @@ -1 +1,7 @@ - \ No newline at end of file + + + /svg/icon/home/wifi/default + + + + \ No newline at end of file diff --git a/theme/settings.svg b/theme/settings.svg index a9c68e4067248..434caf275d458 100644 --- a/theme/settings.svg +++ b/theme/settings.svg @@ -1,7 +1,7 @@ - - - - - + + + /svg/icon/service/settings/default + + - + \ No newline at end of file From b0284b2e02dc738d62535295c53cd204cd100636 Mon Sep 17 00:00:00 2001 From: memurats Date: Mon, 27 Oct 2025 14:49:19 +0100 Subject: [PATCH 02/10] updated gui cmake file --- src/gui/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 05b7d3143899d..20ed138bb6ed4 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -6,9 +6,6 @@ find_package(Qt${QT_MAJOR_VERSION} REQUIRED COMPONENTS Widgets Svg Qml Quick Qui find_package(KF6Archive REQUIRED) find_package(KF6GuiAddons) -#NMC customization: needed to find the ui file in a different location than the header file -set(CMAKE_AUTOUIC_SEARCH_PATHS "${CMAKE_SOURCE_DIR}/src/gui") - if(CMAKE_BUILD_TYPE MATCHES Debug) add_definitions(-DQT_QML_DEBUG) endif() @@ -36,6 +33,9 @@ endif() configure_file(${CMAKE_SOURCE_DIR}/theme.qrc.in ${CMAKE_SOURCE_DIR}/theme.qrc) set(theme_dir ${CMAKE_SOURCE_DIR}/theme) +#NMC customization: needed to find the ui file in a different location than the header file +set(CMAKE_AUTOUIC_SEARCH_PATHS "${CMAKE_SOURCE_DIR}/src/gui") + set(client_UI_SRCS advancedsettings.ui accountsettings.ui From 0e81ae7ea68799c9baa17d21f07d69a0f72574b7 Mon Sep 17 00:00:00 2001 From: memurats Date: Tue, 26 May 2026 12:16:59 +0200 Subject: [PATCH 03/10] fix error --- src/gui/nmcgui/nmcsettingsdialog.cpp | 44 ++++++++++++++++++---------- src/gui/settingsdialog.cpp | 1 - 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/src/gui/nmcgui/nmcsettingsdialog.cpp b/src/gui/nmcgui/nmcsettingsdialog.cpp index 2ed349e7f1018..19be1b636ee0b 100644 --- a/src/gui/nmcgui/nmcsettingsdialog.cpp +++ b/src/gui/nmcgui/nmcsettingsdialog.cpp @@ -50,7 +50,6 @@ void OCC::NMCSettingsDialog::setLayout() const for(auto *action : actions) { if((action->text() == QCoreApplication::translate("OCC::SettingsDialog","General") || action->text() == QCoreApplication::tr("General")) || - (action->text() == QCoreApplication::translate("OCC::SettingsDialog","Network") || action->text() == QCoreApplication::tr("Network")) || (action->text() == QCoreApplication::translate("OCC::SettingsDialog","Account") || action->text() == QCoreApplication::tr("Account"))) { auto *widget = getToolBar()->widgetForAction(action); @@ -68,27 +67,40 @@ void OCC::NMCSettingsDialog::setLayout() const void NMCSettingsDialog::fixAccountButton() const { - auto toolbar = getToolBar(); + auto *toolbar = getToolBar(); + if (!toolbar) { + return; + } + + const auto actions = toolbar->actions(); + if (actions.isEmpty()) { + return; + } - // Sicher prüfen, ob ein Spacer schon existiert - auto *firstAction = toolbar->actions().at(0); - auto *firstWidget = toolbar->widgetForAction(firstAction); - if (!firstWidget || !firstWidget->objectName().startsWith("spacer_left")) { + bool hasLeftSpacer = false; + for (const auto *action : actions) { + const auto *widget = toolbar->widgetForAction(action); + if (widget && widget->objectName() == QLatin1String("spacer_left")) { + hasLeftSpacer = true; + break; + } + } + + if (!hasLeftSpacer) { auto *spacer = new QWidget(toolbar); spacer->setFixedWidth(16); - spacer->setObjectName("spacer_left"); + spacer->setObjectName(QStringLiteral("spacer_left")); spacer->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding); - toolbar->insertWidget(firstAction, spacer); + toolbar->insertWidget(actions.first(), spacer); } - // Account-Button anpassen - if (toolbar->actions().size() > 1) { - auto action = toolbar->actions().at(1); // Index 1, da davor Spacer - auto *widget = toolbar->widgetForAction(action); - if(widget) - { - widget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - widget->setFixedSize(152, 76); + for (auto *action : toolbar->actions()) { + if (action->text() == QCoreApplication::translate("OCC::SettingsDialog", "Account") + || action->text() == QCoreApplication::tr("Account")) { + if (auto *widget = toolbar->widgetForAction(action)) { + widget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); + widget->setFixedSize(152, 76); + } } } } diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index 5c3c05abcd4ae..c39f449fb7a08 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -5,7 +5,6 @@ */ #include "settingsdialog.h" -#include "ui_settingsdialog.h" #include "QtWidgets/qmainwindow.h" #include "advancedsettings.h" From fd13ecaecdf533e1195b118f2496779990b3e32d Mon Sep 17 00:00:00 2001 From: memurats Date: Tue, 26 May 2026 13:54:11 +0200 Subject: [PATCH 04/10] fix error --- src/gui/nmcgui/nmcsettingsdialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/nmcgui/nmcsettingsdialog.cpp b/src/gui/nmcgui/nmcsettingsdialog.cpp index 19be1b636ee0b..5f5cba206fed9 100644 --- a/src/gui/nmcgui/nmcsettingsdialog.cpp +++ b/src/gui/nmcgui/nmcsettingsdialog.cpp @@ -78,8 +78,8 @@ void NMCSettingsDialog::fixAccountButton() const } bool hasLeftSpacer = false; - for (const auto *action : actions) { - const auto *widget = toolbar->widgetForAction(action); + for (auto *action : actions) { + auto *widget = toolbar->widgetForAction(action); if (widget && widget->objectName() == QLatin1String("spacer_left")) { hasLeftSpacer = true; break; From 40912f846edb229f38929b0085f56e51904d709b Mon Sep 17 00:00:00 2001 From: memurats Date: Mon, 1 Jun 2026 14:47:25 +0200 Subject: [PATCH 05/10] remove settings dialog layout changes --- src/gui/nmcgui/nmcsettingsdialog.cpp | 61 +--------------------------- src/gui/nmcgui/nmcsettingsdialog.h | 5 --- 2 files changed, 1 insertion(+), 65 deletions(-) diff --git a/src/gui/nmcgui/nmcsettingsdialog.cpp b/src/gui/nmcgui/nmcsettingsdialog.cpp index 5f5cba206fed9..91463d2ff3ca3 100644 --- a/src/gui/nmcgui/nmcsettingsdialog.cpp +++ b/src/gui/nmcgui/nmcsettingsdialog.cpp @@ -23,17 +23,7 @@ namespace OCC { NMCSettingsDialog::NMCSettingsDialog(ownCloudGui *gui, QWidget *parent) : SettingsDialog(gui, parent) { - setLayout(); - - // The window has no background widget, use palette - // QPalette palette; - // palette.setColor(QPalette::Window, QColor("#F3f3f3")); - // setPalette(palette); - - setFixedSize(760,760); - - getToolBar()->setFixedHeight(92); // 76px button height + 8 + 8 margin top and bottom - getToolBar()->setContentsMargins(8, 0, 8, 0); // Left margin not accepted, Qt bug? + fixAccountButton(); } void NMCSettingsDialog::slotAccountAvatarChanged() @@ -43,28 +33,6 @@ void NMCSettingsDialog::slotAccountAvatarChanged() fixAccountButton(); } -void OCC::NMCSettingsDialog::setLayout() const -{ - //Fix network and general settings button size - const auto actions = getToolBar()->actions(); - for(auto *action : actions) - { - if((action->text() == QCoreApplication::translate("OCC::SettingsDialog","General") || action->text() == QCoreApplication::tr("General")) || - (action->text() == QCoreApplication::translate("OCC::SettingsDialog","Account") || action->text() == QCoreApplication::tr("Account"))) - { - auto *widget = getToolBar()->widgetForAction(action); - if(widget) - { - widget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - widget->setFixedSize(76, 76); - } - } - } - - //Fix initial account button size and stylesheet - fixAccountButton(); -} - void NMCSettingsDialog::fixAccountButton() const { auto *toolbar = getToolBar(); @@ -76,33 +44,6 @@ void NMCSettingsDialog::fixAccountButton() const if (actions.isEmpty()) { return; } - - bool hasLeftSpacer = false; - for (auto *action : actions) { - auto *widget = toolbar->widgetForAction(action); - if (widget && widget->objectName() == QLatin1String("spacer_left")) { - hasLeftSpacer = true; - break; - } - } - - if (!hasLeftSpacer) { - auto *spacer = new QWidget(toolbar); - spacer->setFixedWidth(16); - spacer->setObjectName(QStringLiteral("spacer_left")); - spacer->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding); - toolbar->insertWidget(actions.first(), spacer); - } - - for (auto *action : toolbar->actions()) { - if (action->text() == QCoreApplication::translate("OCC::SettingsDialog", "Account") - || action->text() == QCoreApplication::tr("Account")) { - if (auto *widget = toolbar->widgetForAction(action)) { - widget->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - widget->setFixedSize(152, 76); - } - } - } } } // namespace OCC diff --git a/src/gui/nmcgui/nmcsettingsdialog.h b/src/gui/nmcgui/nmcsettingsdialog.h index 2e917e809d8f6..88fce09e4b910 100644 --- a/src/gui/nmcgui/nmcsettingsdialog.h +++ b/src/gui/nmcgui/nmcsettingsdialog.h @@ -53,11 +53,6 @@ public slots: void slotAccountAvatarChanged(); // NMCGuiInterface interface -protected: - /** - * @brief Sets the layout for the NMCSettingsDialog - */ - void setLayout() const; private: /** From 8f920d6ea9da852bf57517dad3f6c369d2391ea7 Mon Sep 17 00:00:00 2001 From: memurats Date: Tue, 2 Jun 2026 09:51:14 +0200 Subject: [PATCH 06/10] fix layout --- src/gui/nmcgui/nmcsettingsdialog.cpp | 1 + src/gui/settingsdialog.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/nmcgui/nmcsettingsdialog.cpp b/src/gui/nmcgui/nmcsettingsdialog.cpp index 91463d2ff3ca3..7a6be6b4625d7 100644 --- a/src/gui/nmcgui/nmcsettingsdialog.cpp +++ b/src/gui/nmcgui/nmcsettingsdialog.cpp @@ -23,6 +23,7 @@ namespace OCC { NMCSettingsDialog::NMCSettingsDialog(ownCloudGui *gui, QWidget *parent) : SettingsDialog(gui, parent) { + getToolBar()->setIconSize(QSize(24, 24)); fixAccountButton(); } diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index c39f449fb7a08..b01d2d4cade71 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -106,7 +106,7 @@ class CurrentPageSizeStackedWidget : public QStackedWidget constexpr auto TOOLBAR_CSS = QLatin1String( "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; border-radius: 8px; } " + "QToolBar QToolButton { background: transparent; border: none; margin: 0 0 8px; padding: 8px 12px; font-size: 14px; border-radius: 8px; } " "QToolBar QToolBarExtension { padding: 0; } " "QToolBar QToolButton:checked { background: palette(highlight); color: palette(highlighted-text); }" ); From ec4eefaa2a32f77cb8e37fae5b48a39213d2cd13 Mon Sep 17 00:00:00 2001 From: memurats Date: Tue, 2 Jun 2026 12:48:38 +0200 Subject: [PATCH 07/10] fix sidebar --- src/gui/nmcgui/nmcsettingsdialog.cpp | 1 - src/gui/settingsdialog.cpp | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/gui/nmcgui/nmcsettingsdialog.cpp b/src/gui/nmcgui/nmcsettingsdialog.cpp index 7a6be6b4625d7..91463d2ff3ca3 100644 --- a/src/gui/nmcgui/nmcsettingsdialog.cpp +++ b/src/gui/nmcgui/nmcsettingsdialog.cpp @@ -23,7 +23,6 @@ namespace OCC { NMCSettingsDialog::NMCSettingsDialog(ownCloudGui *gui, QWidget *parent) : SettingsDialog(gui, parent) { - getToolBar()->setIconSize(QSize(24, 24)); fixAccountButton(); } diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index b01d2d4cade71..a704906a87a24 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -646,7 +646,7 @@ void SettingsDialog::setupUi() setLayout(mainLayout); _toolBar = new QToolBar; - _toolBar->setIconSize(QSize(32, 32)); + _toolBar->setIconSize(QSize(24, 24)); _toolBar->setToolButtonStyle(Qt::ToolButtonTextBesideIcon); _toolBar->setOrientation(Qt::Vertical); _toolBar->setMovable(false); From 39a5a0fb5d2796d71abbec6b61d3f97d78e7e70c Mon Sep 17 00:00:00 2001 From: Mauro Mura Date: Tue, 2 Jun 2026 15:11:48 +0200 Subject: [PATCH 08/10] Refactor toolbar action handling and remove spacer Removed spacer widget and modified toolbar action insertion. --- src/gui/settingsdialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index a704906a87a24..69cc69815e495 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -338,14 +338,14 @@ void SettingsDialog::accountAdded(AccountState *s) updateAccountAvatar(s->account().data()); if (!brandingSingleAccount) { - accountAction->setToolTip(shortDisplayNameForSettings(s->account().data(), static_cast(height * buttonSizeRatio))); + accountAction->setToolTip(s->account()->displayName()); accountAction->setIconText(shortDisplayNameForSettings(s->account().data(), static_cast(height * buttonSizeRatio))); } if (_firstNonAccountAction) { _toolBar->insertAction(_firstNonAccountAction, accountAction); } else { - _toolBar->addAction(accountAction); + _toolBar->insertAction(_toolBar->actions().at(0), accountAction); } auto accountSettings = new AccountSettings(s, this); QString objectName = QLatin1String("accountSettings_"); From ba7a2acb05c6cb74523fc4f461d7e02852571662 Mon Sep 17 00:00:00 2001 From: Mauro Mura Date: Tue, 2 Jun 2026 15:33:09 +0200 Subject: [PATCH 09/10] Remove unnecessary QMainWindow include --- src/gui/settingsdialog.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index 69cc69815e495..4f5beae294a36 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -5,7 +5,6 @@ */ #include "settingsdialog.h" -#include "QtWidgets/qmainwindow.h" #include "advancedsettings.h" #include "folderman.h" From aae981ff2758c22b477ded88b57d056200a9ca79 Mon Sep 17 00:00:00 2001 From: memurats Date: Tue, 2 Jun 2026 18:09:11 +0200 Subject: [PATCH 10/10] changed settings dialog default size --- src/gui/settingsdialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/settingsdialog.cpp b/src/gui/settingsdialog.cpp index 4f5beae294a36..b27a248432262 100644 --- a/src/gui/settingsdialog.cpp +++ b/src/gui/settingsdialog.cpp @@ -111,8 +111,8 @@ constexpr auto TOOLBAR_CSS = QLatin1String( ); const float buttonSizeRatio = 1.618f; // golden ratio -constexpr auto settingsDialogDefaultWidth = 950; -constexpr auto settingsDialogDefaultHeight = 500; +constexpr auto settingsDialogDefaultWidth = 1024; +constexpr auto settingsDialogDefaultHeight = 640; const auto settingsNavigationIconTextSpacing = QLatin1String(" "); /** display name with two lines that is displayed in the settings