From b2f78dde9650034573a8e1693b0ca06f067fc097 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Thu, 25 Jul 2024 08:04:52 +0200 Subject: [PATCH 01/45] [SES-42][SES-65] Set Application names according for nc-client-building --- .vscode/launch.json | 2 +- NEXTCLOUD.cmake | 4 ++-- theme/ionoseasystorage.VisualElementsManifest.xml | 7 +++++++ 3 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 theme/ionoseasystorage.VisualElementsManifest.xml diff --git a/.vscode/launch.json b/.vscode/launch.json index 94de78649ac26..38a5c72a6f1c8 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -9,7 +9,7 @@ "name": "(RelWithDebInfo) Launch Easystorage", "type": "cppvsdbg", "request": "launch", - "program": "${workspaceFolder}/build/win32-MSVC-x64/RelWithDebInfo/bin/ionos-easystorage.exe", + "program": "${workspaceFolder}/build/win32-MSVC-x64/RelWithDebInfo/bin/ionoseasystorage.exe", "args": [], "stopAtEntry": false, "cwd": "${workspaceFolder}", diff --git a/NEXTCLOUD.cmake b/NEXTCLOUD.cmake index 2ae1f8b71187e..91383e23f5958 100644 --- a/NEXTCLOUD.cmake +++ b/NEXTCLOUD.cmake @@ -1,6 +1,6 @@ -set( APPLICATION_NAME "IONOS Easystorage" ) +set( APPLICATION_NAME "IONOS EasyStorage" ) set( APPLICATION_SHORTNAME "Easystorage" ) -set( APPLICATION_EXECUTABLE "ionos-easystorage" ) +set( APPLICATION_EXECUTABLE "ionoseasystorage" ) set( APPLICATION_CONFIG_NAME "${APPLICATION_EXECUTABLE}" ) set( APPLICATION_DOMAIN "nextcloud.com" ) set( APPLICATION_VENDOR "IONOS Group SE" ) diff --git a/theme/ionoseasystorage.VisualElementsManifest.xml b/theme/ionoseasystorage.VisualElementsManifest.xml new file mode 100644 index 0000000000000..424d569fc64d2 --- /dev/null +++ b/theme/ionoseasystorage.VisualElementsManifest.xml @@ -0,0 +1,7 @@ + + + \ No newline at end of file From 90e72c943a82c1edd31fa36a1ee6be219954a7a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Thu, 25 Jul 2024 11:43:41 +0200 Subject: [PATCH 02/45] [SES-27] Code Format --- src/gui/wizard/welcomepage.ui | 455 +++++++++++++++++----------------- 1 file changed, 228 insertions(+), 227 deletions(-) diff --git a/src/gui/wizard/welcomepage.ui b/src/gui/wizard/welcomepage.ui index e2e920aa315d3..11d5a076e7240 100644 --- a/src/gui/wizard/welcomepage.ui +++ b/src/gui/wizard/welcomepage.ui @@ -1,229 +1,230 @@ - OCC::WelcomePage - - - - 0 - 0 - 500 - 500 - - - - - 0 - 0 - - - - Form - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 80 - - - - - - - - 0 - - - - - - 40 - 16777215 - - - - - - - false - - - false - - - true - - - - - - - - 12 - 75 - true - - - - - - - - - 40 - 16777215 - - - - - - - false - - - false - - - true - - - - - - - - - 0 - - - 0 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - 0 - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - Log in - - - true - - - true - - - - - - - Sign up with provider - - - true - - - false - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - OCC::SlideShow - QWidget -
wizard/slideshow.h
-
- - OCC::LinkLabel - QWidget -
wizard/linklabel.h
- 1 -
-
- - -
+ OCC::WelcomePage + + + + 0 + 0 + 500 + 500 + + + + + 0 + 0 + + + + Form + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 80 + + + + + + + + 0 + + + + + + 40 + 16777215 + + + + + + + false + + + false + + + true + + + + + + + + 12 + 75 + true + + + + + + + + + 40 + 16777215 + + + + + + + false + + + false + + + true + + + + + + + + + 0 + + + 0 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + Log in + + + true + + + true + + + + + + + Sign up with provider + + + true + + + false + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + + OCC::SlideShow + QWidget +
wizard/slideshow.h
+
+ + OCC::LinkLabel + QWidget +
wizard/linklabel.h
+ 1 +
+
+ + + \ No newline at end of file From a39cae1462f0eef3060d703ce378ba7fac8e462e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Thu, 25 Jul 2024 14:59:39 +0200 Subject: [PATCH 03/45] [SES-27][SES-66] Added custom styled button --- src/gui/CMakeLists.txt | 2 + src/gui/sesButton.cpp | 81 ++++++++++++++++++++++++++++++++++++++++ src/gui/sesButton.h | 37 ++++++++++++++++++ src/libsync/ionostheme.h | 40 ++++++++++++++++++++ 4 files changed, 160 insertions(+) create mode 100644 src/gui/sesButton.cpp create mode 100644 src/gui/sesButton.h diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 781c42993f0e4..7856ed1d60966 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -192,6 +192,8 @@ set(client_SRCS syncconflictsmodel.cpp linkButton.h linkButton.cpp + sesButton.h + sesButton.cpp fileactivitylistmodel.h fileactivitylistmodel.cpp filedetails/datefieldbackend.h diff --git a/src/gui/sesButton.cpp b/src/gui/sesButton.cpp new file mode 100644 index 0000000000000..e8b810042fb84 --- /dev/null +++ b/src/gui/sesButton.cpp @@ -0,0 +1,81 @@ +#include "sesButton.h" +#include "IonosTheme.h" +#include "Theme.h" + +namespace OCC { + SesButton::SesButton(QWidget* parent) + : QPushButton(parent) + { + updateStyleSheet(); + setCursor(Qt::PointingHandCursor); + } + + ButtonStyle SesButton::buttonStyle() const { return m_buttonStyle; } + + void SesButton::setButtonStyle(ButtonStyle style) { + if (m_buttonStyle != style) { + m_buttonStyle = style; + updateStyleSheet(); + emit buttonStyleChanged(m_buttonStyle); + } + } + + void SesButton::updateStyleSheet() { + QString styleSheet; + switch (m_buttonStyle) { + case ButtonStyle::Primary: + styleSheet = QStringLiteral( + "QPushButton {" + "background-color: %1; color: %2;" + "font-family: %3; font-size: %4; font-weight: %5;" + "border-radius: %6; padding: %7; }") + .arg( + IonosTheme::buttonColor() + , IonosTheme::white() + , IonosTheme::settingsFont() + , IonosTheme::buttonFontSize() + , IonosTheme::buttonFontWeight() + , IonosTheme::buttonRadius() + , IonosTheme::buttonPadding() + ); + break; + case ButtonStyle::Secondary: + styleSheet = QStringLiteral( + "QPushButton {" + "background-color: %1; color: %2;" + "font-family: %3; font-size: %4; font-weight: %5;" + "border-radius: %6; border-color: %7;" + "padding: %8; }") + .arg( + IonosTheme::white() + , IonosTheme::black() + , IonosTheme::settingsFont() + , IonosTheme::buttonFontSize() + , IonosTheme::buttonFontWeight() + , IonosTheme::buttonRadius() + , IonosTheme::buttonBorderColor() + , IonosTheme::buttonPadding() + ); + break; + case ButtonStyle::Disabled: + styleSheet = QStringLiteral( + "QPushButton {" + "background-color: %1; color: %2;" + "font-family: %3; font-size: %4; font-weight: %5;" + "border-radius: %6;" + "padding: %7; }") + .arg( + IonosTheme::buttonDisabledColor() + , IonosTheme::buttonDisabledFontColor() + , IonosTheme::settingsFont() + , IonosTheme::buttonFontSize() + , IonosTheme::buttonFontWeight() + , IonosTheme::buttonRadius() + , IonosTheme::buttonPadding() + ); + setEnabled(false); + break; + } + setStyleSheet(styleSheet); + } +} \ No newline at end of file diff --git a/src/gui/sesButton.h b/src/gui/sesButton.h new file mode 100644 index 0000000000000..4fbc67ce00910 --- /dev/null +++ b/src/gui/sesButton.h @@ -0,0 +1,37 @@ +#ifndef SESBUTTON_H +#define SESBUTTON_H + +#include +#include +#include +namespace OCC { + + enum class ButtonStyle { + Primary, + Secondary, + Disabled + }; + + class SesButton : public QPushButton + { + Q_OBJECT + Q_PROPERTY(ButtonStyle buttonStyle READ buttonStyle WRITE setButtonStyle NOTIFY buttonStyleChanged) + + public: + explicit SesButton(QWidget* parent = nullptr); + + ButtonStyle buttonStyle() const; + + public slots: + void setButtonStyle(ButtonStyle style); + + signals: + void buttonStyleChanged(ButtonStyle newStyle); + + private: + ButtonStyle m_buttonStyle; + + void updateStyleSheet(); + }; +} +#endif // SESBUTTON_H diff --git a/src/libsync/ionostheme.h b/src/libsync/ionostheme.h index 525aa56f4b595..20da47ef0e26d 100644 --- a/src/libsync/ionostheme.h +++ b/src/libsync/ionostheme.h @@ -39,6 +39,46 @@ class IonosTheme { return "#02306A"; } + static QString buttonFontSize() { + return "16px"; + } + + static QString buttonFontWeight() { + return "550"; + } + + static QString buttonColor() { + return "#0F6CBD"; + } + + static QString buttonRadius() { + return "4px"; + } + + static QString buttonPadding() { + return "16px"; + } + + static QString buttonBorderColor() { + return "#D1D1D1"; + } + + static QString buttonDisabledColor() { + return "#F0F0F0"; + } + + static QString buttonDisabledFontColor() { + return "#BDBDBD"; + } + + static QString white() { + return "#FFFFFF"; + } + + static QString black() { + return "#000000"; + } + private: IonosTheme() {} }; \ No newline at end of file From 83c52f826cca28ba4f31ecbdce7ecf4e90897182 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Thu, 25 Jul 2024 15:05:09 +0200 Subject: [PATCH 04/45] [SES-27][SES-66] used custom styled button in welcome page --- src/gui/wizard/welcomepage.cpp | 1 + src/gui/wizard/welcomepage.ui | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gui/wizard/welcomepage.cpp b/src/gui/wizard/welcomepage.cpp index 0186016358085..49d2f5f64a731 100644 --- a/src/gui/wizard/welcomepage.cpp +++ b/src/gui/wizard/welcomepage.cpp @@ -18,6 +18,7 @@ #include "wizard/owncloudwizard.h" #include "wizard/slideshow.h" #include "ui_welcomepage.h" +#include "sesButton.h" namespace OCC { diff --git a/src/gui/wizard/welcomepage.ui b/src/gui/wizard/welcomepage.ui index 11d5a076e7240..1e295c2abac2b 100644 --- a/src/gui/wizard/welcomepage.ui +++ b/src/gui/wizard/welcomepage.ui @@ -138,7 +138,10 @@ - + + + OCC::ButtonStyle::Primary + Log in From 97f75988c5e802c2dfdf163dde77494cbf6e3257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Thu, 25 Jul 2024 15:46:20 +0200 Subject: [PATCH 05/45] [SES-27][SES-66] fixed secondary style (add border) --- src/gui/sesButton.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/sesButton.cpp b/src/gui/sesButton.cpp index e8b810042fb84..971598ec798ec 100644 --- a/src/gui/sesButton.cpp +++ b/src/gui/sesButton.cpp @@ -44,7 +44,7 @@ namespace OCC { "QPushButton {" "background-color: %1; color: %2;" "font-family: %3; font-size: %4; font-weight: %5;" - "border-radius: %6; border-color: %7;" + "border-radius: %6; border: 1px solid %7;" "padding: %8; }") .arg( IonosTheme::white() From 6252d626c17660eb8107b105e913c13edd1a7916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Fri, 26 Jul 2024 09:47:01 +0200 Subject: [PATCH 06/45] [SES-27] Set background color according to design --- src/gui/wizard/owncloudwizard.cpp | 9 ++++++++- src/libsync/ionostheme.h | 4 ++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/gui/wizard/owncloudwizard.cpp b/src/gui/wizard/owncloudwizard.cpp index 238286aa0accd..960e36acd7f1b 100644 --- a/src/gui/wizard/owncloudwizard.cpp +++ b/src/gui/wizard/owncloudwizard.cpp @@ -26,6 +26,7 @@ #include "wizard/owncloudadvancedsetuppage.h" #include "wizard/webviewpage.h" #include "wizard/flow2authcredspage.h" +#include "ionostheme.h" #include "common/vfs.h" @@ -406,8 +407,14 @@ void OwncloudWizard::customizeStyle() // Set background colors auto wizardPalette = palette(); - const auto backgroundColor = wizardPalette.color(QPalette::Window); + const auto backgroundColor = QColor(IonosTheme::welcomeBackgroundColor()); + + // Set Color of upper part wizardPalette.setColor(QPalette::Base, backgroundColor); + + // Set Color of lower part + wizardPalette.setColor(backgroundRole(), backgroundColor); + // Set separator color wizardPalette.setColor(QPalette::Mid, backgroundColor); diff --git a/src/libsync/ionostheme.h b/src/libsync/ionostheme.h index 20da47ef0e26d..3690f94662ca3 100644 --- a/src/libsync/ionostheme.h +++ b/src/libsync/ionostheme.h @@ -79,6 +79,10 @@ class IonosTheme { return "#000000"; } + static QString welcomeBackgroundColor() { + return "#FAFAFA"; + } + private: IonosTheme() {} }; \ No newline at end of file From ed2f97cebdd648b06cf108ed2755361e0068a2c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Fri, 26 Jul 2024 09:59:42 +0200 Subject: [PATCH 07/45] [SES-27] Changed to more speaking names --- src/gui/wizard/welcomepage.ui | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/wizard/welcomepage.ui b/src/gui/wizard/welcomepage.ui index 1e295c2abac2b..2daa834ed48ef 100644 --- a/src/gui/wizard/welcomepage.ui +++ b/src/gui/wizard/welcomepage.ui @@ -37,7 +37,7 @@ - + 0 @@ -99,7 +99,7 @@ - + 0 From 5f7243fda957585fe02ee4922edf3d76cad3a7c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Fri, 26 Jul 2024 10:00:29 +0200 Subject: [PATCH 08/45] [SES-27] Adjusted sizes --- src/gui/wizard/welcomepage.ui | 40 ++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/src/gui/wizard/welcomepage.ui b/src/gui/wizard/welcomepage.ui index 2daa834ed48ef..4b1e18bc6cf94 100644 --- a/src/gui/wizard/welcomepage.ui +++ b/src/gui/wizard/welcomepage.ui @@ -6,8 +6,8 @@ 0 0 - 500 - 500 + 626 + 450 @@ -31,7 +31,7 @@ 20 - 80 + 129 @@ -72,6 +72,11 @@ true + + + 287 + + @@ -98,6 +103,22 @@ + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 119 + + + + @@ -132,7 +153,7 @@ 20 - 40 + 0 @@ -150,7 +171,7 @@ true - + @@ -178,7 +199,7 @@ 20 - 40 + 0 @@ -193,7 +214,7 @@ 40 - 20 + 0 @@ -205,10 +226,13 @@ Qt::Vertical + + QSizePolicy::Fixed + 20 - 40 + 0 From 15bad250481a05f1c839630a53081719f5ba04c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Fri, 26 Jul 2024 10:00:47 +0200 Subject: [PATCH 09/45] [SES-27] Hide Image on welcomepage --- src/gui/wizard/welcomepage.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gui/wizard/welcomepage.cpp b/src/gui/wizard/welcomepage.cpp index 49d2f5f64a731..361d20245fabb 100644 --- a/src/gui/wizard/welcomepage.cpp +++ b/src/gui/wizard/welcomepage.cpp @@ -66,10 +66,11 @@ void WelcomePage::styleSlideShow() const auto wizardTalkIconFileName = theme->isBranded() ? Theme::hidpiFileName("wizard-talk.png", backgroundColor) : Theme::hidpiFileName(":/client/theme/colored/wizard-talk.png"); - _ui->slideShow->addSlide(wizardNextcloudIconFileName, tr("Keep your data secure and under your control")); - _ui->slideShow->addSlide(wizardFilesIconFileName, tr("Secure collaboration & file exchange")); - _ui->slideShow->addSlide(wizardGroupwareIconFileName, tr("Easy-to-use web mail, calendaring & contacts")); - _ui->slideShow->addSlide(wizardTalkIconFileName, tr("Screensharing, online meetings & web conferences")); + QPixmap emptyPixmap; + _ui->slideShow->addSlide(emptyPixmap, tr("Keep your data secure and under your control")); + // _ui->slideShow->addSlide(wizardFilesIconFileName, tr("Secure collaboration & file exchange")); + // _ui->slideShow->addSlide(wizardGroupwareIconFileName, tr("Easy-to-use web mail, calendaring & contacts")); + // _ui->slideShow->addSlide(wizardTalkIconFileName, tr("Screensharing, online meetings & web conferences")); const auto isDarkBackground = Theme::isDarkColor(backgroundColor); _ui->slideShowNextButton->setIcon(theme->uiThemeIcon(QString("control-next.svg"), isDarkBackground)); From 5f6b49127c7e13f30b63e97551006fa7eee63d7f Mon Sep 17 00:00:00 2001 From: Kevin Beraz Date: Mon, 29 Jul 2024 11:46:04 +0200 Subject: [PATCH 10/45] [SES-46] hide set status option --- src/gui/tray/UserLine.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/tray/UserLine.qml b/src/gui/tray/UserLine.qml index 954d7b19a599e..73f9140ac6b0b 100644 --- a/src/gui/tray/UserLine.qml +++ b/src/gui/tray/UserLine.qml @@ -130,7 +130,7 @@ AbstractButton { closePolicy: Menu.CloseOnPressOutsideParent | Menu.CloseOnEscape MenuItem { - visible: model.isConnected && model.serverHasUserStatus + visible: false height: visible ? implicitHeight : 0 text: qsTr("Set status") font.pixelSize: Style.topLinePixelSize From bb4f18266eb8712984d662d02155f79394246e53 Mon Sep 17 00:00:00 2001 From: Kevin Beraz Date: Mon, 29 Jul 2024 14:17:01 +0200 Subject: [PATCH 11/45] [SES-46] add icons to Menu Items --- src/gui/tray/UserLine.qml | 2 ++ theme.qrc.in | 2 ++ theme/Style/Style.qml | 2 ++ theme/ses/ses-delete.svg | 3 +++ theme/ses/ses-logout.svg | 3 +++ 5 files changed, 12 insertions(+) create mode 100644 theme/ses/ses-delete.svg create mode 100644 theme/ses/ses-logout.svg diff --git a/src/gui/tray/UserLine.qml b/src/gui/tray/UserLine.qml index 73f9140ac6b0b..6f968c6001c12 100644 --- a/src/gui/tray/UserLine.qml +++ b/src/gui/tray/UserLine.qml @@ -140,6 +140,7 @@ AbstractButton { } MenuItem { + icon.source: Style.sesLogout text: model.isConnected ? qsTr("Log out") : qsTr("Log in") font.pixelSize: Style.topLinePixelSize palette.windowText: Style.ncTextColor @@ -174,6 +175,7 @@ AbstractButton { MenuItem { id: removeAccountButton + icon.source: Style.sesDelete text: qsTr("Remove account") font.pixelSize: Style.topLinePixelSize palette.windowText: Style.ncTextColor diff --git a/theme.qrc.in b/theme.qrc.in index 842fd5506dcd5..ca2a57a293f66 100644 --- a/theme.qrc.in +++ b/theme.qrc.in @@ -245,6 +245,8 @@ theme/ses/ses-accountPlus.svg theme/ses/ses-accountSettings.svg theme/ses/ses-accountResume.svg + theme/ses/ses-logout.svg + theme/ses/ses-delete.svg theme/ses/ses-settings.svg theme/ses/ses-INONS-Logo.svg theme/ses/ses-accountIcon.svg diff --git a/theme/Style/Style.qml b/theme/Style/Style.qml index 89f496070afaf..390850c9c3c7c 100644 --- a/theme/Style/Style.qml +++ b/theme/Style/Style.qml @@ -218,6 +218,8 @@ QtObject { readonly property string sesAccountPlus: "qrc:///client/theme/ses/ses-accountPlus.svg" readonly property string sesAccountSettings: "qrc:///client/theme/ses/ses-accountSettings.svg" readonly property string sesAccountResume: "qrc:///client/theme/ses/ses-accountResume.svg" + readonly property string sesLogout: "qrc:///client/theme/ses/ses-logout.svg" + readonly property string sesDelete: "qrc:///client/theme/ses/ses-delete.svg" readonly property color sesIconColor: "#1474C4" readonly property color sesIconActive: "#095BB1" diff --git a/theme/ses/ses-delete.svg b/theme/ses/ses-delete.svg new file mode 100644 index 0000000000000..c77bc38b6bd78 --- /dev/null +++ b/theme/ses/ses-delete.svg @@ -0,0 +1,3 @@ + + + diff --git a/theme/ses/ses-logout.svg b/theme/ses/ses-logout.svg new file mode 100644 index 0000000000000..f7884fabada05 --- /dev/null +++ b/theme/ses/ses-logout.svg @@ -0,0 +1,3 @@ + + + From d99decd031bedbc6ad3f666e9711b926eb3dbb43 Mon Sep 17 00:00:00 2001 From: Kevin Beraz Date: Mon, 29 Jul 2024 14:18:36 +0200 Subject: [PATCH 12/45] [SES-46] add rounded corners for dropdown --- src/gui/tray/UserLine.qml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/tray/UserLine.qml b/src/gui/tray/UserLine.qml index 6f968c6001c12..d560b463d195d 100644 --- a/src/gui/tray/UserLine.qml +++ b/src/gui/tray/UserLine.qml @@ -129,6 +129,10 @@ AbstractButton { id: userMoreButtonMenu closePolicy: Menu.CloseOnPressOutsideParent | Menu.CloseOnEscape + background: Rectangle { + radius: Style.sesCornerRadius + } + MenuItem { visible: false height: visible ? implicitHeight : 0 From cb7fa7198924d430aab6df2b3c8987f9f1886a4f Mon Sep 17 00:00:00 2001 From: Kevin Beraz Date: Mon, 29 Jul 2024 14:19:22 +0200 Subject: [PATCH 13/45] [SES-46] add rounded corners for hover effect on each item --- src/gui/tray/UserLine.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/tray/UserLine.qml b/src/gui/tray/UserLine.qml index d560b463d195d..bb6acf45315d9 100644 --- a/src/gui/tray/UserLine.qml +++ b/src/gui/tray/UserLine.qml @@ -158,6 +158,7 @@ AbstractButton { height: parent.height width: parent.menu.width Rectangle { + radius: Style.sesCornerRadius anchors.fill: parent anchors.margins: 1 color: parent.parent.hovered ? Style.sesHover : "transparent" @@ -193,6 +194,7 @@ AbstractButton { height: parent.height width: parent.menu.width Rectangle { + radius: Style.sesCornerRadius anchors.fill: parent anchors.margins: 1 color: parent.parent.hovered ? Style.sesHover : "transparent" From ebba15de6c9477390436c774e72693e222528ff3 Mon Sep 17 00:00:00 2001 From: Kevin Beraz Date: Mon, 29 Jul 2024 14:19:45 +0200 Subject: [PATCH 14/45] [SES-46] set border color --- src/gui/tray/UserLine.qml | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/tray/UserLine.qml b/src/gui/tray/UserLine.qml index bb6acf45315d9..12f94ec0aa00a 100644 --- a/src/gui/tray/UserLine.qml +++ b/src/gui/tray/UserLine.qml @@ -131,6 +131,7 @@ AbstractButton { background: Rectangle { radius: Style.sesCornerRadius + border.color: Style.sesBorderColor } MenuItem { From a73cf68eb64a0b05867ccdea78b0a3e296c50541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Mon, 29 Jul 2024 14:40:26 +0200 Subject: [PATCH 15/45] [SES-27][SES-67] Defined overwriteURL to skip SetupPage --- NEXTCLOUD.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEXTCLOUD.cmake b/NEXTCLOUD.cmake index 91383e23f5958..a23a4e5a09c24 100644 --- a/NEXTCLOUD.cmake +++ b/NEXTCLOUD.cmake @@ -15,7 +15,7 @@ else() endif() set( APPLICATION_ICON_SET "SVG" ) -set( APPLICATION_SERVER_URL "" CACHE STRING "URL for the server to use. If entered, the UI field will be pre-filled with it" ) +set( APPLICATION_SERVER_URL "https://use09.thegood.cloud" CACHE STRING "URL for the server to use. If entered, the UI field will be pre-filled with it" ) set( APPLICATION_SERVER_URL_ENFORCE ON ) # If set and APPLICATION_SERVER_URL is defined, the server can only connect to the pre-defined URL set( APPLICATION_REV_DOMAIN "com.nextcloud.desktopclient" ) # set( APPLICATION_VIRTUALFILE_SUFFIX "nextcloud" CACHE STRING "Virtual file suffix (not including the .)") From 10979d79cad53cbfb90d25c17059ea64f74e3ef3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Mon, 29 Jul 2024 14:40:59 +0200 Subject: [PATCH 16/45] [SES-27][SES-67] Hide Back-Button on Page_Flow2AuthCreds --- src/gui/wizard/owncloudwizard.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/wizard/owncloudwizard.cpp b/src/gui/wizard/owncloudwizard.cpp index 960e36acd7f1b..30038159b1765 100644 --- a/src/gui/wizard/owncloudwizard.cpp +++ b/src/gui/wizard/owncloudwizard.cpp @@ -323,6 +323,10 @@ void OwncloudWizard::slotCurrentPageChanged(int id) #endif // WITH_WEBENGINE id == WizardCommon::Page_Flow2AuthCreds) { setButtonLayout({ QWizard::BackButton, QWizard::Stretch }); + #ifdef APPLICATION_SERVER_URL_ENFORCE + button(QWizard::BackButton)->setHidden(true); + #endif + } else if (id == WizardCommon::Page_AdvancedSetup) { setButtonLayout({ QWizard::CustomButton2, QWizard::Stretch, QWizard::CustomButton1, QWizard::FinishButton }); setNextButtonAsDefault(); From b143ddc7ffbbf710f8924decbd0960432b2f947d Mon Sep 17 00:00:00 2001 From: Kevin Beraz Date: Mon, 29 Jul 2024 14:49:02 +0200 Subject: [PATCH 17/45] [SES-46] remove unnecessary onPressed function there is an onClicked Function that does exactly the same. We want to show a highlighted color when button is pressed --- src/gui/tray/UserLine.qml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/gui/tray/UserLine.qml b/src/gui/tray/UserLine.qml index 12f94ec0aa00a..0cffda57e69b0 100644 --- a/src/gui/tray/UserLine.qml +++ b/src/gui/tray/UserLine.qml @@ -168,15 +168,6 @@ AbstractButton { Accessible.role: Accessible.Button Accessible.name: model.isConnected ? qsTr("Log out") : qsTr("Log in") - - onPressed: { - if (model.isConnected) { - UserModel.logout(index) - } else { - UserModel.login(index) - } - accountMenu.close() - } } MenuItem { From 36cd834c3c3578c419f473bb7b8af3d5b419b9ce Mon Sep 17 00:00:00 2001 From: Kevin Beraz Date: Mon, 29 Jul 2024 14:49:51 +0200 Subject: [PATCH 18/45] [SES-46] show highlighted color when button is pressed --- src/gui/tray/UserLine.qml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/gui/tray/UserLine.qml b/src/gui/tray/UserLine.qml index 0cffda57e69b0..758be242c5688 100644 --- a/src/gui/tray/UserLine.qml +++ b/src/gui/tray/UserLine.qml @@ -145,6 +145,7 @@ AbstractButton { } MenuItem { + id: logInOutButton icon.source: Style.sesLogout text: model.isConnected ? qsTr("Log out") : qsTr("Log in") font.pixelSize: Style.topLinePixelSize @@ -162,7 +163,7 @@ AbstractButton { radius: Style.sesCornerRadius anchors.fill: parent anchors.margins: 1 - color: parent.parent.hovered ? Style.sesHover : "transparent" + color: logInOutButton.pressed ? Style.sesButtonPressed : logInOutButton.hovered ? Style.sesAccountMenuHover : "transparent" } } @@ -189,7 +190,7 @@ AbstractButton { radius: Style.sesCornerRadius anchors.fill: parent anchors.margins: 1 - color: parent.parent.hovered ? Style.sesHover : "transparent" + color: removeAccountButton.pressed ? Style.sesButtonPressed : removeAccountButton.hovered ? Style.sesAccountMenuHover : "transparent" } } From 81a957e04776770e9cd33d2ae013aff5716ebf9e Mon Sep 17 00:00:00 2001 From: Kevin Beraz Date: Mon, 29 Jul 2024 15:53:31 +0200 Subject: [PATCH 19/45] [SES-46] change icon color when button is pressed --- src/gui/tray/UserLine.qml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/tray/UserLine.qml b/src/gui/tray/UserLine.qml index 758be242c5688..86812e3ca7c8a 100644 --- a/src/gui/tray/UserLine.qml +++ b/src/gui/tray/UserLine.qml @@ -147,6 +147,7 @@ AbstractButton { MenuItem { id: logInOutButton icon.source: Style.sesLogout + icon.color: logInOutButton.pressed ? Style.sesIconActive : Style.sesIconColor text: model.isConnected ? qsTr("Log out") : qsTr("Log in") font.pixelSize: Style.topLinePixelSize palette.windowText: Style.ncTextColor @@ -174,6 +175,7 @@ AbstractButton { MenuItem { id: removeAccountButton icon.source: Style.sesDelete + icon.color: removeAccountButton.pressed ? Style.sesIconActive : Style.sesIconColor text: qsTr("Remove account") font.pixelSize: Style.topLinePixelSize palette.windowText: Style.ncTextColor From f396283f4d76046a278dfa0bf7755838834a7ef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Mon, 29 Jul 2024 16:16:21 +0200 Subject: [PATCH 20/45] [SES-46] Changed AccessibleType to MenuItem and added visualFocus for correct hover --- src/gui/tray/UserLine.qml | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/src/gui/tray/UserLine.qml b/src/gui/tray/UserLine.qml index 86812e3ca7c8a..283bc49c70fa4 100644 --- a/src/gui/tray/UserLine.qml +++ b/src/gui/tray/UserLine.qml @@ -146,8 +146,12 @@ AbstractButton { MenuItem { id: logInOutButton + + property bool isHovered: logInOutButton.hovered || logInOutButton.visualFocus + property bool isActive: logInOutButton.pressed + icon.source: Style.sesLogout - icon.color: logInOutButton.pressed ? Style.sesIconActive : Style.sesIconColor + icon.color: logInOutButton.isActive ? Style.sesIconActive : Style.sesIconColor text: model.isConnected ? qsTr("Log out") : qsTr("Log in") font.pixelSize: Style.topLinePixelSize palette.windowText: Style.ncTextColor @@ -164,18 +168,22 @@ AbstractButton { radius: Style.sesCornerRadius anchors.fill: parent anchors.margins: 1 - color: logInOutButton.pressed ? Style.sesButtonPressed : logInOutButton.hovered ? Style.sesAccountMenuHover : "transparent" + color: logInOutButton.isActive ? Style.isHovered : logInOutButton.isHovered ? Style.sesAccountMenuHover : "transparent" } } - Accessible.role: Accessible.Button + Accessible.role: Accessible.MenuItem Accessible.name: model.isConnected ? qsTr("Log out") : qsTr("Log in") } MenuItem { + + property bool isHovered: removeAccountButton.hovered || removeAccountButton.visualFocus + property bool isActive: removeAccountButton.pressed + id: removeAccountButton icon.source: Style.sesDelete - icon.color: removeAccountButton.pressed ? Style.sesIconActive : Style.sesIconColor + icon.color: removeAccountButton.isActive ? Style.sesIconActive : Style.sesIconColor text: qsTr("Remove account") font.pixelSize: Style.topLinePixelSize palette.windowText: Style.ncTextColor @@ -192,11 +200,11 @@ AbstractButton { radius: Style.sesCornerRadius anchors.fill: parent anchors.margins: 1 - color: removeAccountButton.pressed ? Style.sesButtonPressed : removeAccountButton.hovered ? Style.sesAccountMenuHover : "transparent" + color: removeAccountButton.isActive ? Style.sesButtonPressed : removeAccountButton.isHovered ? Style.sesAccountMenuHover : "transparent" } } - Accessible.role: Accessible.Button + Accessible.role: Accessible.MenuItem Accessible.name: text Accessible.onPressAction: removeAccountButton.clicked() } From 266ca93ce7b597047ea604c99616bea34878ebd5 Mon Sep 17 00:00:00 2001 From: Kevin Beraz Date: Thu, 1 Aug 2024 09:35:23 +0200 Subject: [PATCH 21/45] [SES-67] turn off APPLICATION_SERVER_URL_ENFORCE for developement --- NEXTCLOUD.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEXTCLOUD.cmake b/NEXTCLOUD.cmake index a23a4e5a09c24..7288aba3e5c2c 100644 --- a/NEXTCLOUD.cmake +++ b/NEXTCLOUD.cmake @@ -16,7 +16,7 @@ endif() set( APPLICATION_ICON_SET "SVG" ) set( APPLICATION_SERVER_URL "https://use09.thegood.cloud" CACHE STRING "URL for the server to use. If entered, the UI field will be pre-filled with it" ) -set( APPLICATION_SERVER_URL_ENFORCE ON ) # If set and APPLICATION_SERVER_URL is defined, the server can only connect to the pre-defined URL +set( APPLICATION_SERVER_URL_ENFORCE OFF ) # If set and APPLICATION_SERVER_URL is defined, the server can only connect to the pre-defined URL set( APPLICATION_REV_DOMAIN "com.nextcloud.desktopclient" ) # set( APPLICATION_VIRTUALFILE_SUFFIX "nextcloud" CACHE STRING "Virtual file suffix (not including the .)") set( APPLICATION_OCSP_STAPLING_ENABLED OFF ) From 2ac2a3f1d1c7d395c44e77b83071a37a0c6c206b Mon Sep 17 00:00:00 2001 From: Kevin Beraz Date: Thu, 1 Aug 2024 09:38:08 +0200 Subject: [PATCH 22/45] [SES-67] autofill setup page every time --- src/gui/wizard/owncloudwizard.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/wizard/owncloudwizard.cpp b/src/gui/wizard/owncloudwizard.cpp index 30038159b1765..bbc76833265ff 100644 --- a/src/gui/wizard/owncloudwizard.cpp +++ b/src/gui/wizard/owncloudwizard.cpp @@ -337,6 +337,10 @@ void OwncloudWizard::slotCurrentPageChanged(int id) if (id == WizardCommon::Page_ServerSetup) { emit clearPendingRequests(); + #ifdef APPLICATION_SERVER_URL_ENFORCE + _setupPage->setServerUrl(APPLICATION_SERVER_URL); + _setupPage->initializePage(); + #endif } if (id == WizardCommon::Page_AdvancedSetup && _credentialsPage == _flow2CredsPage) { From bb2ed7a0db7dd89cfb8551b941d69bd8f2465d7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Tue, 30 Jul 2024 11:28:13 +0200 Subject: [PATCH 23/45] [SES-27][SES-68] Just Code Format --- src/gui/wizard/owncloudadvancedsetuppage.ui | 1524 ++++++++++--------- 1 file changed, 781 insertions(+), 743 deletions(-) diff --git a/src/gui/wizard/owncloudadvancedsetuppage.ui b/src/gui/wizard/owncloudadvancedsetuppage.ui index 5f51a2d824e10..4346e6141bb74 100644 --- a/src/gui/wizard/owncloudadvancedsetuppage.ui +++ b/src/gui/wizard/owncloudadvancedsetuppage.ui @@ -1,749 +1,787 @@ - OwncloudAdvancedSetupPage - - - - 0 - 0 - 912 - 633 - - - - - 0 - 0 - - - - Form - - - - - - - - - - - - 0 - 0 - - - - TextLabel - - - Qt::PlainText - - - Qt::AlignCenter - - - true - - - - - - - QLayout::SetFixedSize - - - - - Avatar - - - Qt::PlainText - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - &Local Folder - - - Qt::PlainText - - - Qt::AlignCenter - - - pbSelectLocalFolder - - - - - - - - true - - - - Username - - - Qt::PlainText - - - Qt::AlignCenter - - - - - - - - true - - - - Local Folder - - - Qt::PlainText - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - Choose different folder - - - true - - - false - - - - - - - - 0 - 0 - - - - Free space - - - Qt::PlainText - - - Qt::AlignCenter - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 40 - - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 40 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Server address - - - Qt::PlainText - - - Qt::AlignHCenter|Qt::AlignTop - - - true - - - - - - - Sync Logo - - - Qt::PlainText - - - Qt::AlignCenter - - - - - - - - - QLayout::SetMinimumSize - - - 0 - - - 0 - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - 0 - - - 0 - - - - - 0 - - - 0 - - - - - 0 - - - - - Synchronize everything from server - - - true - - - - - - - Size - - - Qt::PlainText - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - 0 - - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 20 - 20 - - - - - - - - Ask before syncing folders larger than - - - - - - - - 0 - 0 - - - - Qt::StrongFocus - - - 999999 - - - 99 - - - - - - - MB - - - Qt::PlainText - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - 0 - - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 20 - 20 - - - - - - - - Ask before syncing external storages - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - 0 - - - - - - 0 - 0 - - - - - - - false - - - - - - - Choose what to sync - - - true - - - false - - - - - - - TextLabel - - - Qt::PlainText - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 0 - 0 - - - - Use virtual files !PLACEHOLDER! - - - false - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 0 - 0 - - - - - 6 - - - QLayout::SetMinimumSize - - - 0 - - - 2 - - - 0 - - - 0 - - - - - - 0 - 0 - - - - - 9 - true - - - - 1 - - - Status message - - - Qt::AutoText - - - Qt::AlignCenter - - - false - - - - - - - + OwncloudAdvancedSetupPage + + + + 0 + 0 + 912 + 633 + + + + 0 0 - - - - Keep local data - - - true - - - - - - - - 0 - 0 - - - - <html><head/><body><p>If this box is checked, existing content in the local folder will be erased to start a clean sync from the server.</p><p>Do not check this if the local content should be uploaded to the servers folder.</p></body></html> - - - Erase local folder and start a clean sync - - - true - - + + + + Form + + + + + + + + + + + + 0 + 0 + + + + TextLabel + + + Qt::PlainText + + + Qt::AlignCenter + + + true + + + + + + + QLayout::SetFixedSize + + + + + Avatar + + + Qt::PlainText + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + &Local Folder + + + Qt::PlainText + + + Qt::AlignCenter + + + pbSelectLocalFolder + + + + + + + + true + + + + Username + + + Qt::PlainText + + + Qt::AlignCenter + + + + + + + + true + + + + Local Folder + + + Qt::PlainText + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + Choose different folder + + + true + + + false + + + + + + + + 0 + 0 + + + + Free space + + + Qt::PlainText + + + Qt::AlignCenter + + + true + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 40 + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 40 + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + Server address + + + Qt::PlainText + + + Qt::AlignHCenter|Qt::AlignTop + + + true + + + + + + + Sync Logo + + + Qt::PlainText + + + Qt::AlignCenter + + + + + + + + + QLayout::SetMinimumSize + + + 0 + + + 0 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + + + 0 + + + + + 0 + + + 0 + + + + + 0 + + + + + Synchronize everything from + server + + + true + + + + + + + Size + + + Qt::PlainText + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Minimum + + + + 20 + 20 + + + + + + + + Ask before syncing folders + larger than + + + + + + + + 0 + 0 + + + + Qt::StrongFocus + + + 999999 + + + 99 + + + + + + + + MB + + + Qt::PlainText + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Minimum + + + + 20 + 20 + + + + + + + + Ask before syncing external + storages + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + 0 + + + + + + 0 + 0 + + + + + + + false + + + + + + + Choose what to sync + + + true + + + false + + + + + + + TextLabel + + + Qt::PlainText + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + 0 + 0 + + + + Use virtual + files !PLACEHOLDER! + + + false + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + 0 + 0 + + + + + 6 + + + QLayout::SetMinimumSize + + + 0 + + + 2 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 9 + true + + + + 1 + + + Status message + + + Qt::AutoText + + + Qt::AlignCenter + + + false + + + + + + + + 0 + 0 + + + + Keep local data + + + true + + + + + + + + 0 + 0 + + + + + <html><head/><body><p>If + this box is checked, existing + content in the local folder will be + erased to start a clean sync from + the server.</p><p>Do not + check this if the local content + should be uploaded to the servers + folder.</p></body></html> + + + Erase local folder and start a + clean sync + + + true + + + + + + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + TextLabel + + + Qt::PlainText + + + + + + + TextLabel + + + Qt::PlainText + + + + - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - TextLabel - - - Qt::PlainText - - - - - - - TextLabel - - - Qt::PlainText - - - - - - - - - - - rSyncEverything - toggled(bool) - confCheckBoxSize - setEnabled(bool) - - - 217 - 78 - - - 298 - 126 - - - - - rSyncEverything - toggled(bool) - confSpinBox - setEnabled(bool) - - - 311 - 83 - - - 952 - 134 - - - - - rSyncEverything - toggled(bool) - confTraillingSizeLabel - setEnabled(bool) - - - 277 - 76 - - - 1076 - 136 - - - - - rSyncEverything - toggled(bool) - confCheckBoxExternal - setEnabled(bool) - - - 181 - 78 - - - 382 - 174 - - - - - + + + + + rSyncEverything + toggled(bool) + confCheckBoxSize + setEnabled(bool) + + + 217 + 78 + + + 298 + 126 + + + + + rSyncEverything + toggled(bool) + confSpinBox + setEnabled(bool) + + + 311 + 83 + + + 952 + 134 + + + + + rSyncEverything + toggled(bool) + confTraillingSizeLabel + setEnabled(bool) + + + 277 + 76 + + + 1076 + 136 + + + + + rSyncEverything + toggled(bool) + confCheckBoxExternal + setEnabled(bool) + + + 181 + 78 + + + 382 + 174 + + + + + \ No newline at end of file From 95eb1d3bbaea20ee53467d0219c47a2ed4d0366a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Tue, 30 Jul 2024 14:47:16 +0200 Subject: [PATCH 24/45] [SES-27][SES-68] Extracted "raw" design in static methods to reuse --- src/gui/sesButton.cpp | 40 ++++++++++++++++++++++++++-------------- src/gui/sesButton.h | 4 +++- 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/src/gui/sesButton.cpp b/src/gui/sesButton.cpp index 971598ec798ec..a01b238f0702c 100644 --- a/src/gui/sesButton.cpp +++ b/src/gui/sesButton.cpp @@ -20,12 +20,9 @@ namespace OCC { } } - void SesButton::updateStyleSheet() { - QString styleSheet; - switch (m_buttonStyle) { - case ButtonStyle::Primary: - styleSheet = QStringLiteral( - "QPushButton {" + QString SesButton::rawPrimaryStyle(){ + return QStringLiteral( + "{" "background-color: %1; color: %2;" "font-family: %3; font-size: %4; font-weight: %5;" "border-radius: %6; padding: %7; }") @@ -38,10 +35,11 @@ namespace OCC { , IonosTheme::buttonRadius() , IonosTheme::buttonPadding() ); - break; - case ButtonStyle::Secondary: - styleSheet = QStringLiteral( - "QPushButton {" + } + + QString SesButton::rawSecondaryStyle(){ + return QStringLiteral( + "{" "background-color: %1; color: %2;" "font-family: %3; font-size: %4; font-weight: %5;" "border-radius: %6; border: 1px solid %7;" @@ -56,10 +54,11 @@ namespace OCC { , IonosTheme::buttonBorderColor() , IonosTheme::buttonPadding() ); - break; - case ButtonStyle::Disabled: - styleSheet = QStringLiteral( - "QPushButton {" + } + + QString SesButton::rawDisabledStyle(){ + return QStringLiteral( + "{" "background-color: %1; color: %2;" "font-family: %3; font-size: %4; font-weight: %5;" "border-radius: %6;" @@ -73,6 +72,19 @@ namespace OCC { , IonosTheme::buttonRadius() , IonosTheme::buttonPadding() ); + } + + void SesButton::updateStyleSheet() { + QString styleSheet; + switch (m_buttonStyle) { + case ButtonStyle::Primary: + styleSheet = QStringLiteral("QPushButton") + rawPrimaryStyle(); + break; + case ButtonStyle::Secondary: + styleSheet = QStringLiteral("QPushButton") + rawSecondaryStyle(); + break; + case ButtonStyle::Disabled: + styleSheet = QStringLiteral("QPushButton") + rawDisabledStyle(); setEnabled(false); break; } diff --git a/src/gui/sesButton.h b/src/gui/sesButton.h index 4fbc67ce00910..3e73f9dfcfd86 100644 --- a/src/gui/sesButton.h +++ b/src/gui/sesButton.h @@ -19,7 +19,9 @@ namespace OCC { public: explicit SesButton(QWidget* parent = nullptr); - + static QString rawPrimaryStyle(); + static QString rawSecondaryStyle(); + static QString rawDisabledStyle(); ButtonStyle buttonStyle() const; public slots: From b2e9f9d1276d5a5c4961229038c53bd12ea7eeb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Tue, 30 Jul 2024 14:54:52 +0200 Subject: [PATCH 25/45] [SES-27][SES-68] Set Style for wizard buttons WIP, because the Background has still a wrong color --- src/gui/wizard/owncloudwizard.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/gui/wizard/owncloudwizard.cpp b/src/gui/wizard/owncloudwizard.cpp index bbc76833265ff..c0baa32c967d1 100644 --- a/src/gui/wizard/owncloudwizard.cpp +++ b/src/gui/wizard/owncloudwizard.cpp @@ -27,6 +27,7 @@ #include "wizard/webviewpage.h" #include "wizard/flow2authcredspage.h" #include "ionostheme.h" +#include "sesButton.h" #include "common/vfs.h" @@ -427,6 +428,21 @@ void OwncloudWizard::customizeStyle() wizardPalette.setColor(QPalette::Mid, backgroundColor); setPalette(wizardPalette); + + setStyleSheet( + //FinishButton + QStringLiteral("QWizard QPushButton#qt_wizard_finish") + + SesButton::rawPrimaryStyle() + + //NextButton + QStringLiteral("QWizard QPushButton#__qt__passive_wizardbutton0") + + SesButton::rawSecondaryStyle() + + //CustomButton1 + QStringLiteral("QWizard QPushButton#__qt__passive_wizardbutton6") + + SesButton::rawSecondaryStyle() + + //CustomButton2 + QStringLiteral("QWizard QPushButton#__qt__passive_wizardbutton7") + + SesButton::rawSecondaryStyle() + + )); } void OwncloudWizard::bringToTop() From 86bfae537721ffde1d1b784e7eae051fc55d1619 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Tue, 30 Jul 2024 14:55:44 +0200 Subject: [PATCH 26/45] [SES-27][SES-68] Added namespace and IncludeGuard --- src/libsync/ionostheme.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/libsync/ionostheme.h b/src/libsync/ionostheme.h index 3690f94662ca3..08c14aa357fb6 100644 --- a/src/libsync/ionostheme.h +++ b/src/libsync/ionostheme.h @@ -1,4 +1,8 @@ +#ifndef _IONOSTHEME_H +#define _IONOSTHEME_H + #include +namespace OCC { class IonosTheme { public: @@ -85,4 +89,6 @@ class IonosTheme { private: IonosTheme() {} -}; \ No newline at end of file +}; +} +#endif // _IONOSTHEME_H \ No newline at end of file From 1a37a0ac14f95df1a81fbfec243e315f0eb56b54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Tue, 30 Jul 2024 14:56:44 +0200 Subject: [PATCH 27/45] [SES-27][SES-68] Changed Icons --- src/gui/wizard/owncloudadvancedsetuppage.cpp | 20 +++++++++++++------- src/gui/wizard/owncloudadvancedsetuppage.h | 1 + src/libsync/ionostheme.h | 14 ++++++++++++++ theme.qrc.in | 3 +++ theme/ses/ses-folder32.svg | 3 +++ theme/ses/ses-setupAvatar.svg | 10 ++++++++++ theme/ses/ses-syncArrows.svg | 3 +++ 7 files changed, 47 insertions(+), 7 deletions(-) create mode 100644 theme/ses/ses-folder32.svg create mode 100644 theme/ses/ses-setupAvatar.svg create mode 100644 theme/ses/ses-syncArrows.svg diff --git a/src/gui/wizard/owncloudadvancedsetuppage.cpp b/src/gui/wizard/owncloudadvancedsetuppage.cpp index fd19ec8e9efab..510fe41020d69 100644 --- a/src/gui/wizard/owncloudadvancedsetuppage.cpp +++ b/src/gui/wizard/owncloudadvancedsetuppage.cpp @@ -34,6 +34,7 @@ #include "creds/abstractcredentials.h" #include "networkjobs.h" #include "wizard/owncloudwizard.h" +#include "ionostheme.h" namespace OCC { @@ -196,7 +197,7 @@ void OwncloudAdvancedSetupPage::initializePage() _ui.confSpinBox->setValue(newFolderLimit.second); _ui.confCheckBoxExternal->setChecked(cfgFile.confirmExternalStorage()); - fetchUserAvatar(); + SetAvatarIcon(); setUserInformation(); customizeStyle(); @@ -219,6 +220,12 @@ void OwncloudAdvancedSetupPage::initializePage() } } +void OwncloudAdvancedSetupPage::SetAvatarIcon() +{ + const auto icon = QIcon(IonosTheme::avatarIcon()); + _ui.lServerIcon->setPixmap(icon.pixmap(32)); +} + void OwncloudAdvancedSetupPage::fetchUserAvatar() { // Reset user avatar @@ -586,10 +593,8 @@ void OwncloudAdvancedSetupPage::customizeStyle() void OwncloudAdvancedSetupPage::styleLocalFolderLabel() { - const auto backgroundColor = palette().window().color(); - const auto folderIconFileName = Theme::instance()->isBranded() ? Theme::hidpiFileName("folder.png", backgroundColor) - : Theme::hidpiFileName(":/client/theme/colored/folder.png"); - _ui.lLocal->setPixmap(folderIconFileName); + const auto icon = QIcon(IonosTheme::folderIcon()); + _ui.lLocal->setPixmap(icon.pixmap(32)); } void OwncloudAdvancedSetupPage::setRadioChecked(QRadioButton *radio) @@ -608,8 +613,9 @@ void OwncloudAdvancedSetupPage::setRadioChecked(QRadioButton *radio) void OwncloudAdvancedSetupPage::styleSyncLogo() { - const auto syncArrowIcon = Theme::createColorAwareIcon(QLatin1String(":/client/theme/sync-arrow.svg"), palette()); - _ui.syncLogoLabel->setPixmap(syncArrowIcon.pixmap(QSize(50, 50))); + const auto syncArrowIcon = QIcon(IonosTheme::syncArrows()); + // const auto syncArrowIcon = Theme::createColorAwareIcon(QLatin1String(":/client/theme/sync-arrow.svg"), palette()); + _ui.syncLogoLabel->setPixmap(syncArrowIcon.pixmap(QSize(32,32))); } void OwncloudAdvancedSetupPage::setupResoultionWidget() diff --git a/src/gui/wizard/owncloudadvancedsetuppage.h b/src/gui/wizard/owncloudadvancedsetuppage.h index 2c0f23bb42b37..d078222de5768 100644 --- a/src/gui/wizard/owncloudadvancedsetuppage.h +++ b/src/gui/wizard/owncloudadvancedsetuppage.h @@ -82,6 +82,7 @@ private slots: void setResolutionGuiVisible(bool value); void setupResoultionWidget(); void fetchUserAvatar(); + void SetAvatarIcon(); void setUserInformation(); // TODO: remove when UX decision is made diff --git a/src/libsync/ionostheme.h b/src/libsync/ionostheme.h index 08c14aa357fb6..d7104f4644770 100644 --- a/src/libsync/ionostheme.h +++ b/src/libsync/ionostheme.h @@ -2,11 +2,25 @@ #define _IONOSTHEME_H #include +#include "theme.h" + namespace OCC { class IonosTheme { public: + static QString avatarIcon() { + return QString(Theme::themePrefix) + QStringLiteral("ses/ses-setupAvatar.svg"); + } + + static QString folderIcon() { + return QString(Theme::themePrefix) + QStringLiteral("ses/ses-folder32.svg"); + } + + static QString syncArrows() { + return QString(Theme::themePrefix) + QStringLiteral("ses/ses-syncArrows.svg"); + } + static QString toolbarActionBorderRadius() { return "8px"; } diff --git a/theme.qrc.in b/theme.qrc.in index ca2a57a293f66..b58a6ca0f5721 100644 --- a/theme.qrc.in +++ b/theme.qrc.in @@ -253,5 +253,8 @@ theme/ses/ses-accountIcon24.svg theme/ses/ses-website.svg theme/ses/ses-filesIcon.svg + theme/ses/ses-setupAvatar.svg + theme/ses/ses-folder32.svg + theme/ses/ses-syncArrows.svg diff --git a/theme/ses/ses-folder32.svg b/theme/ses/ses-folder32.svg new file mode 100644 index 0000000000000..c427e2a556696 --- /dev/null +++ b/theme/ses/ses-folder32.svg @@ -0,0 +1,3 @@ + + + diff --git a/theme/ses/ses-setupAvatar.svg b/theme/ses/ses-setupAvatar.svg new file mode 100644 index 0000000000000..a64895cad6b24 --- /dev/null +++ b/theme/ses/ses-setupAvatar.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/theme/ses/ses-syncArrows.svg b/theme/ses/ses-syncArrows.svg new file mode 100644 index 0000000000000..302cafa235bc4 --- /dev/null +++ b/theme/ses/ses-syncArrows.svg @@ -0,0 +1,3 @@ + + + From b67209bd90fb3f5fb924d4902d8e1cc138834d30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Tue, 30 Jul 2024 14:56:59 +0200 Subject: [PATCH 28/45] [SES-27][SES-68] Used Secondary SESButton --- src/gui/wizard/owncloudadvancedsetuppage.ui | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/gui/wizard/owncloudadvancedsetuppage.ui b/src/gui/wizard/owncloudadvancedsetuppage.ui index 4346e6141bb74..8310d74a8bdb9 100644 --- a/src/gui/wizard/owncloudadvancedsetuppage.ui +++ b/src/gui/wizard/owncloudadvancedsetuppage.ui @@ -125,13 +125,16 @@ - + 0 0 + + OCC::ButtonStyle::Secondary + Choose different folder From 9b3634f6da2570bbf5d69b84213561a92e3672f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Tue, 30 Jul 2024 15:19:06 +0200 Subject: [PATCH 29/45] [SES-27][SES-68] Reverted some Code Format changes Fixed f78515e2c4419e7ab0332388465d96e52a7ee35a. String properties are display false, when linebreaks are introduced --- src/gui/wizard/owncloudadvancedsetuppage.ui | 29 +++++---------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/src/gui/wizard/owncloudadvancedsetuppage.ui b/src/gui/wizard/owncloudadvancedsetuppage.ui index 8310d74a8bdb9..32b13d55b1edc 100644 --- a/src/gui/wizard/owncloudadvancedsetuppage.ui +++ b/src/gui/wizard/owncloudadvancedsetuppage.ui @@ -307,8 +307,7 @@ - Synchronize everything from - server + Synchronize everything from server true @@ -367,8 +366,7 @@ - Ask before syncing folders - larger than + Ask before syncing folders larger than @@ -396,9 +394,7 @@ - - MB + MB Qt::PlainText @@ -446,8 +442,7 @@ - Ask before syncing external - storages + Ask before syncing external storages @@ -543,8 +538,7 @@ - Use virtual - files !PLACEHOLDER! + Use virtual files !PLACEHOLDER! false @@ -657,19 +651,10 @@ - - <html><head/><body><p>If - this box is checked, existing - content in the local folder will be - erased to start a clean sync from - the server.</p><p>Do not - check this if the local content - should be uploaded to the servers - folder.</p></body></html> + <html><head/><body><p>If this box is checked, existing content in the local folder will be erased to start a clean sync from the server.</p><p>Do not check this if the local content should be uploaded to the servers folder.</p></body></html> - Erase local folder and start a - clean sync + Erase local folder and start a clean sync true From f51d20528865505b3948e199c90dfdac2e762b10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Wed, 31 Jul 2024 08:08:49 +0200 Subject: [PATCH 30/45] [SES-27] Clean Up --- src/gui/tray/AccountMenuItem.qml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/gui/tray/AccountMenuItem.qml b/src/gui/tray/AccountMenuItem.qml index 96f30b33fca7f..6cc41d46424ae 100644 --- a/src/gui/tray/AccountMenuItem.qml +++ b/src/gui/tray/AccountMenuItem.qml @@ -17,10 +17,6 @@ MenuItem { font.pixelSize: Style.topLinePixelSize hoverEnabled: true - // onClicked: Systray.openSettings() - // text: qsTr("Settings") - // icon.source: Style.sesAccountSettings - icon.height: Style.smallIconSize icon.width: Style.smallIconSize icon.color: accountMenuItem.isActive ? Style.sesIconActive : Style.sesIconColor From 06cae469f27565431365a1af4cf25fc02ccadfad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Wed, 31 Jul 2024 08:09:33 +0200 Subject: [PATCH 31/45] [SES-27][SES-68] Fixed build error --- src/gui/wizard/owncloudwizard.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/wizard/owncloudwizard.cpp b/src/gui/wizard/owncloudwizard.cpp index c0baa32c967d1..31b5ba4bae20e 100644 --- a/src/gui/wizard/owncloudwizard.cpp +++ b/src/gui/wizard/owncloudwizard.cpp @@ -441,8 +441,8 @@ void OwncloudWizard::customizeStyle() + SesButton::rawSecondaryStyle() + //CustomButton2 QStringLiteral("QWizard QPushButton#__qt__passive_wizardbutton7") - + SesButton::rawSecondaryStyle() + - )); + + SesButton::rawSecondaryStyle() + ); } void OwncloudWizard::bringToTop() From 5ffa94b4868053dd183adfab0b9a64a54caad46e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Wed, 31 Jul 2024 11:07:43 +0200 Subject: [PATCH 32/45] [SES-27][SES-68] Removed unnecessary spacer to be replaced by margin --- src/gui/wizard/owncloudadvancedsetuppage.ui | 717 +++++++++----------- 1 file changed, 337 insertions(+), 380 deletions(-) diff --git a/src/gui/wizard/owncloudadvancedsetuppage.ui b/src/gui/wizard/owncloudadvancedsetuppage.ui index 32b13d55b1edc..71e468c742f89 100644 --- a/src/gui/wizard/owncloudadvancedsetuppage.ui +++ b/src/gui/wizard/owncloudadvancedsetuppage.ui @@ -258,426 +258,383 @@ - - - QLayout::SetMinimumSize - - + + 0 0 - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - + + 0 0 - + 0 - - 0 - - - - 0 + + + Synchronize everything from server + + + true - - - - Synchronize everything from server - - - true - - - - - - - Size - - - Qt::PlainText - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + - - - 0 + + + Size + + + Qt::PlainText - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 20 - 20 - - - - - - - - Ask before syncing folders larger than - - - - - - - - 0 - 0 - - - - Qt::StrongFocus - - - 999999 - - - 99 - - - - - - - MB - - - Qt::PlainText - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + - - + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Minimum - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 20 - 20 - - - - - - - - Ask before syncing external storages - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + + + 20 + 20 + + + - - - 0 + + + Ask before syncing folders larger than - - - - - 0 - 0 - - - - - - - false - - - - - - - Choose what to sync - - - true - - - false - - - - - - - TextLabel - - - Qt::PlainText - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + - - - - - - 0 - 0 - - - - Use virtual files !PLACEHOLDER! - - - false - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + + + + 0 + 0 + + + + Qt::StrongFocus + + + 999999 + + + 99 + + + + + + + MB + + + Qt::PlainText + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + 0 + + + + + Qt::Horizontal + + + QSizePolicy::Minimum + + + + 20 + 20 + + + + + + + + Ask before syncing external storages + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + - - - - 0 - 0 - + + + 0 - - - 6 + + + + + 0 + 0 + + + + + + + false + + + + + + + Choose what to sync + + + true + + + false + + + + + + + TextLabel + + + Qt::PlainText + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + 0 + 0 + + + + Use virtual files !PLACEHOLDER! + + + false + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + 0 + 0 + + + + + 6 + + + QLayout::SetMinimumSize + + + 0 + + + 2 + + + 0 + + + 0 + + + + + + 0 + 0 + - - QLayout::SetMinimumSize + + + 9 + true + - - 0 + + 1 - - 2 + + Status message - - 0 + + Qt::AutoText - - 0 + + Qt::AlignCenter - - - - - 0 - 0 - - - - - 9 - true - - - - 1 - - - Status message - - - Qt::AutoText - - - Qt::AlignCenter - - - false - - - - - - - - 0 - 0 - - - - Keep local data - - - true - - - - - - - - 0 - 0 - - - - <html><head/><body><p>If this box is checked, existing content in the local folder will be erased to start a clean sync from the server.</p><p>Do not check this if the local content should be uploaded to the servers folder.</p></body></html> - - - Erase local folder and start a clean sync - - - true - - - - - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - + + false + + + + + + + + 0 + 0 + + + + Keep local data + + + true + + + + + + + + 0 + 0 + + + + <html><head/><body><p>If this box is checked, existing content in the local folder will be erased to start a clean sync from the server.</p><p>Do not check this if the local content should be uploaded to the servers folder.</p></body></html> + + + Erase local folder and start a clean sync + + + true + + + + + From 49e026d4046ea460f99184d8b7494dcdb2d698d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Wed, 31 Jul 2024 11:21:23 +0200 Subject: [PATCH 33/45] [SES-27][SES-68] Added left margin --- src/gui/wizard/owncloudadvancedsetuppage.ui | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/gui/wizard/owncloudadvancedsetuppage.ui b/src/gui/wizard/owncloudadvancedsetuppage.ui index 71e468c742f89..b745524efa3b8 100644 --- a/src/gui/wizard/owncloudadvancedsetuppage.ui +++ b/src/gui/wizard/owncloudadvancedsetuppage.ui @@ -259,11 +259,8 @@ - - 0 - - - 0 + + 32 From c4fa2a80fe140303055b969aa2740e03dfb3591c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Wed, 31 Jul 2024 11:23:08 +0200 Subject: [PATCH 34/45] [SES-27][SES-68] removed redundant QVBoxLayout --- src/gui/wizard/owncloudadvancedsetuppage.ui | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/src/gui/wizard/owncloudadvancedsetuppage.ui b/src/gui/wizard/owncloudadvancedsetuppage.ui index b745524efa3b8..4b997caacb1aa 100644 --- a/src/gui/wizard/owncloudadvancedsetuppage.ui +++ b/src/gui/wizard/owncloudadvancedsetuppage.ui @@ -258,22 +258,14 @@ - + 32 - + 0 - - - 0 - - - - - 0 40 20 - - - - - + + + From 20c0dfcbfe5dd9ebb661f3b548fd98fcd82ad67e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Thu, 1 Aug 2024 08:39:01 +0200 Subject: [PATCH 35/45] [SES-27][SES-68] WIP removed old GridLayout --- src/gui/wizard/owncloudadvancedsetuppage.ui | 213 +------------------- 1 file changed, 3 insertions(+), 210 deletions(-) diff --git a/src/gui/wizard/owncloudadvancedsetuppage.ui b/src/gui/wizard/owncloudadvancedsetuppage.ui index 4b997caacb1aa..b5162057b2a88 100644 --- a/src/gui/wizard/owncloudadvancedsetuppage.ui +++ b/src/gui/wizard/owncloudadvancedsetuppage.ui @@ -47,221 +47,14 @@ - - - - QLayout::SetFixedSize - - - - - Avatar - - - Qt::PlainText - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - &Local Folder - - - Qt::PlainText - - - Qt::AlignCenter - - - pbSelectLocalFolder - - - - - - - - true - - - - Username - - - Qt::PlainText - - - Qt::AlignCenter - - - - - - - - true - - - - Local Folder - - - Qt::PlainText - - - Qt::AlignCenter - - - - - - - - 0 - 0 - - - - OCC::ButtonStyle::Secondary - - - Choose different folder - - - true - - - false - - - - - - - - 0 - 0 - - - - Free space - - - Qt::PlainText - - - Qt::AlignCenter - - - true - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 40 - - - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 40 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - Server address - - - Qt::PlainText - - - Qt::AlignHCenter|Qt::AlignTop - - - true - - - - - - - Sync Logo - - - Qt::PlainText - - - Qt::AlignCenter - - - - - 32 + + 32 + From 38212469e8bbc69911ae7c720ad2b0a00878d3f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Thu, 1 Aug 2024 08:39:59 +0200 Subject: [PATCH 36/45] [SES-27][SES-68] Added old content with new HBox/VBox Layouts --- src/gui/wizard/owncloudadvancedsetuppage.ui | 211 ++++++++++++++++++++ 1 file changed, 211 insertions(+) diff --git a/src/gui/wizard/owncloudadvancedsetuppage.ui b/src/gui/wizard/owncloudadvancedsetuppage.ui index b5162057b2a88..1d3efde43d8f6 100644 --- a/src/gui/wizard/owncloudadvancedsetuppage.ui +++ b/src/gui/wizard/owncloudadvancedsetuppage.ui @@ -47,6 +47,217 @@ + + + + + + + + + + + 0 + 0 + + + + Avatar + + + Qt::PlainText + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + + true + + + + Username + + + Qt::PlainText + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + Server address + + + Qt::PlainText + + + Qt::AlignHCenter|Qt::AlignTop + + + true + + + + + + + + + + + + + 0 + 0 + + + + Sync Logo + + + Qt::PlainText + + + Qt::AlignTop|Qt::AlignHCenter + + + + + + + + + + + + + 0 + 0 + + + + &Local Folder + + + Qt::PlainText + + + Qt::AlignCenter + + + pbSelectLocalFolder + + + + + + + + 0 + 0 + + + + + true + + + + Local Folder + + + Qt::PlainText + + + Qt::AlignCenter + + + + + + + + 0 + 0 + + + + Free space + + + Qt::PlainText + + + Qt::AlignCenter + + + true + + + + + + + Qt::Vertical + + + + 40 + 16 + + + + QSizePolicy::Fixed + + + + + + + + 0 + 0 + + + + OCC::ButtonStyle::Secondary + + + Choose different folder + + + true + + + false + + + + + + + + From 7471f43c7d4c966d514c968fdf6baf715593e984 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Thu, 1 Aug 2024 08:56:44 +0200 Subject: [PATCH 37/45] [SES-27][SES-68] Set Margins, Alignments and Spacings for TopArea --- src/gui/wizard/owncloudadvancedsetuppage.cpp | 22 +++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/gui/wizard/owncloudadvancedsetuppage.cpp b/src/gui/wizard/owncloudadvancedsetuppage.cpp index 510fe41020d69..63a83faee23a0 100644 --- a/src/gui/wizard/owncloudadvancedsetuppage.cpp +++ b/src/gui/wizard/owncloudadvancedsetuppage.cpp @@ -50,7 +50,7 @@ OwncloudAdvancedSetupPage::OwncloudAdvancedSetupPage(OwncloudWizard *wizard) _filePathLabel->setElideMode(Qt::ElideMiddle); _filePathLabel->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); _filePathLabel->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); - _ui.locationsGridLayout->addWidget(_filePathLabel.data(), 3, 3); + _ui.locationsVBox->insertWidget(2, _filePathLabel.data()); _filePathLabel->setTextFormat(Qt::PlainText); _ui.userNameLabel->setTextFormat(Qt::PlainText); @@ -587,6 +587,26 @@ void OwncloudAdvancedSetupPage::customizeStyle() } } + _ui.wSyncStrategySynchronizeEverything->setContentsMargins(0, 0, 0, 0); + _ui.lVirtualFileSync->setContentsMargins(0, 0, 0, 0); + _ui.horizontalLayout_8->setContentsMargins(32, 0, 0, 0); + _ui.horizontalLayout_10->setContentsMargins(0, 8, 0, 0); + _ui.horizontalLayout_10->setMargin(1); + _ui.gridLayout_2->setContentsMargins(0, 0, 0, 0); + _ui.wSyncStrategy->setSpacing(16); + _ui.verticalLayout->setSpacing(0); + _ui.topAreaHBox->setContentsMargins(32, 32, 32, 0); + _ui.serverVBox->setAlignment(Qt::AlignTop); + _ui.serverVBox->setSpacing(0); + _ui.serverVBox->setContentsMargins(0, 0, 0, 0); + _ui.arrowVBox->setSpacing(0); + _ui.arrowVBox->setContentsMargins(0, 0, 0, 0); + _ui.arrowVBox->setAlignment(Qt::AlignTop); + _ui.locationsVBox->setAlignment(Qt::AlignTop); + _ui.locationsVBox->setContentsMargins(0, 0, 0, 0); + _ui.locationsVBox->setSpacing(0); + + styleSyncLogo(); styleLocalFolderLabel(); } From a1cb24a41115a1f20bba0561c737cc57afdac858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Thu, 1 Aug 2024 08:59:44 +0200 Subject: [PATCH 38/45] [SES-27][SES-68] Remove not needed button --- src/gui/wizard/owncloudadvancedsetuppage.cpp | 2 -- src/gui/wizard/owncloudadvancedsetuppage.ui | 16 +--------------- 2 files changed, 1 insertion(+), 17 deletions(-) diff --git a/src/gui/wizard/owncloudadvancedsetuppage.cpp b/src/gui/wizard/owncloudadvancedsetuppage.cpp index 63a83faee23a0..06353ab52a4e8 100644 --- a/src/gui/wizard/owncloudadvancedsetuppage.cpp +++ b/src/gui/wizard/owncloudadvancedsetuppage.cpp @@ -78,7 +78,6 @@ OwncloudAdvancedSetupPage::OwncloudAdvancedSetupPage(OwncloudWizard *wizard) if (Theme::instance()->enforceVirtualFilesSyncFolder()) { _ui.rSyncEverything->setDisabled(true); _ui.rSelectiveSync->setDisabled(true); - _ui.bSelectiveSync->setDisabled(true); } connect(_ui.rSyncEverything, &QAbstractButton::clicked, this, &OwncloudAdvancedSetupPage::slotSyncEverythingClicked); @@ -90,7 +89,6 @@ OwncloudAdvancedSetupPage::OwncloudAdvancedSetupPage(OwncloudWizard *wizard) _selectiveSyncBlacklist.clear(); } }); - connect(_ui.bSelectiveSync, &QAbstractButton::clicked, this, &OwncloudAdvancedSetupPage::slotSelectiveSyncClicked); const auto theme = Theme::instance(); const auto appIcon = theme->applicationIcon(); diff --git a/src/gui/wizard/owncloudadvancedsetuppage.ui b/src/gui/wizard/owncloudadvancedsetuppage.ui index 1d3efde43d8f6..567561bdcd605 100644 --- a/src/gui/wizard/owncloudadvancedsetuppage.ui +++ b/src/gui/wizard/owncloudadvancedsetuppage.ui @@ -443,27 +443,13 @@ - + Choose what to sync false - - - - Choose what to sync - - - true - - - false - - - From e81e27c8e792b7a29a85034de9b8dcf0b31d3809 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20H=C3=A4tty?= Date: Thu, 1 Aug 2024 09:00:41 +0200 Subject: [PATCH 39/45] [SES-27][SES-68] Removed not needed spacer and added some margins --- src/gui/wizard/owncloudadvancedsetuppage.ui | 404 +++++++++----------- 1 file changed, 184 insertions(+), 220 deletions(-) diff --git a/src/gui/wizard/owncloudadvancedsetuppage.ui b/src/gui/wizard/owncloudadvancedsetuppage.ui index 567561bdcd605..01bf89edc7ac0 100644 --- a/src/gui/wizard/owncloudadvancedsetuppage.ui +++ b/src/gui/wizard/owncloudadvancedsetuppage.ui @@ -270,241 +270,205 @@ 0 + + + + + Synchronize everything from server - - - - Synchronize everything from server - - - true - - - - - - - Size - - - Qt::PlainText - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + + true + + - - - 0 + + + Size - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 20 - 20 - - - - - - - - Ask before syncing folders larger than - - - - - - - - 0 - 0 - - - - Qt::StrongFocus - - - 999999 - - - 99 - - - - - - - MB - - - Qt::PlainText - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + + Qt::PlainText + + - - - 0 + + + Qt::Horizontal - - - - Qt::Horizontal - - - QSizePolicy::Minimum - - - - 20 - 20 - - - - - - - - Ask before syncing external storages - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + + + 40 + 20 + + + + + + + + - - - 0 + + + Qt::Horizontal - - - - - 0 - 0 - - - + + QSizePolicy::Minimum + + + + 20 + 20 + + + + + + + + Ask before syncing folders larger than + + + + + + + + 0 + 0 + + + + Qt::StrongFocus + + + 999999 + + + 99 + + + + + + + MB + + + Qt::PlainText + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + Ask before syncing external storages + + + 32 + + + + + + + + + 8 + + + + + + 0 + 0 + + + Choose what to sync - - - false - - - - - - - TextLabel - - - Qt::PlainText - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + + + false + + + + + + + TextLabel + + + Qt::PlainText + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + - - - - 0 - 0 - - - - Use virtual files !PLACEHOLDER! - - - false - - - - - - - Qt::Horizontal - - - - 40 - 20 + + + + 0 + 0 + + + + Use virtual files !PLACEHOLDER! + + + false + + + + + + + Qt::Horizontal + + + + 40 + 20 From 14e3e2c5ddd120fa2e344cc427221a158665e134 Mon Sep 17 00:00:00 2001 From: Kevin Beraz Date: Thu, 1 Aug 2024 11:15:07 +0200 Subject: [PATCH 40/45] [SES-58] reformat file --- src/gui/foldercreationdialog.ui | 196 ++++++++++++++++---------------- 1 file changed, 98 insertions(+), 98 deletions(-) diff --git a/src/gui/foldercreationdialog.ui b/src/gui/foldercreationdialog.ui index 84d7c77e18654..06f82eaa1fbc4 100644 --- a/src/gui/foldercreationdialog.ui +++ b/src/gui/foldercreationdialog.ui @@ -1,100 +1,100 @@ - OCC::FolderCreationDialog - - - - 0 - 0 - 355 - 138 - - - - Create new folder - - - - - 0 - 90 - 341 - 32 - - - - Qt::Horizontal - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - 20 - 30 - 321 - 22 - - - - Enter folder name - - - - - true - - - - 20 - 60 - 321 - 16 - - - - color: rgb(255, 0, 0) - - - Folder already exists - - - - - - - buttonBox - accepted() - OCC::FolderCreationDialog - accept() - - - 248 - 254 - - - 157 - 274 - - - - - buttonBox - rejected() - OCC::FolderCreationDialog - reject() - - - 316 - 260 - - - 286 - 274 - - - - - + OCC::FolderCreationDialog + + + + 0 + 0 + 355 + 138 + + + + Create new folder + + + + + 0 + 90 + 341 + 32 + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + 20 + 30 + 321 + 22 + + + + Enter folder name + + + + + true + + + + 20 + 60 + 321 + 16 + + + + color: rgb(255, 0, 0) + + + Folder already exists + + + + + + + buttonBox + accepted() + OCC::FolderCreationDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + OCC::FolderCreationDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + \ No newline at end of file From 0eef32037140e2925a6cd01a2cba9f66b4b8f960 Mon Sep 17 00:00:00 2001 From: Kevin Beraz Date: Fri, 2 Aug 2024 13:17:19 +0200 Subject: [PATCH 41/45] [SES-58] set Flag to prevent user from resizing window this still allows automatic resizing due to different scalings --- src/gui/foldercreationdialog.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/foldercreationdialog.cpp b/src/gui/foldercreationdialog.cpp index a245c9f4dc461..b1a79f94dd81e 100644 --- a/src/gui/foldercreationdialog.cpp +++ b/src/gui/foldercreationdialog.cpp @@ -35,6 +35,7 @@ FolderCreationDialog::FolderCreationDialog(const QString &destination, QWidget * ui->labelErrorMessage->setVisible(false); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); + setWindowFlags(windowFlags() | Qt::Dialog | Qt::WindowMinMaxButtonsHint); connect(ui->newFolderNameEdit, &QLineEdit::textChanged, this, &FolderCreationDialog::slotNewFolderNameEditTextEdited); From 26c8dd8628734896aa0a9ef1e68026c18e8af64c Mon Sep 17 00:00:00 2001 From: Kevin Beraz Date: Fri, 2 Aug 2024 13:20:45 +0200 Subject: [PATCH 42/45] [SES-58] customize button style --- src/gui/foldercreationdialog.cpp | 29 ++++++++++++++++++++++++++++- src/gui/foldercreationdialog.h | 2 ++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/src/gui/foldercreationdialog.cpp b/src/gui/foldercreationdialog.cpp index b1a79f94dd81e..4a689d1def49e 100644 --- a/src/gui/foldercreationdialog.cpp +++ b/src/gui/foldercreationdialog.cpp @@ -14,6 +14,8 @@ #include "foldercreationdialog.h" #include "ui_foldercreationdialog.h" +#include "ionostheme.h" +#include "sesButton.h" #include @@ -32,6 +34,8 @@ FolderCreationDialog::FolderCreationDialog(const QString &destination, QWidget * { ui->setupUi(this); + customizeStyle(); + ui->labelErrorMessage->setVisible(false); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); @@ -93,4 +97,27 @@ void FolderCreationDialog::slotNewFolderNameEditTextEdited() } } -} +void FolderCreationDialog::customizeStyle() +{ + ui->buttonBox->setLayoutDirection(Qt::RightToLeft); + + QPushButton *okButton = ui->buttonBox->button(QDialogButtonBox::Ok); + QPushButton *cancelButton = ui->buttonBox->button(QDialogButtonBox::Cancel); + QHBoxLayout* buttonlayout = qobject_cast(ui->buttonBox->layout()); + + if(buttonlayout){ + buttonlayout->setSpacing(16); + } + + if(okButton){ + okButton->setMinimumWidth(80); + okButton->setMinimumHeight(40); + okButton->setStyleSheet(QStringLiteral("QPushButton") + SesButton::rawPrimaryStyle()); + } + + if(cancelButton){ + cancelButton->setMinimumWidth(80); + cancelButton->setMinimumHeight(40); + cancelButton->setStyleSheet(QStringLiteral("QPushButton") + SesButton::rawSecondaryStyle()); + } +} \ No newline at end of file diff --git a/src/gui/foldercreationdialog.h b/src/gui/foldercreationdialog.h index 3d8642112f2c4..78d582a41e24d 100644 --- a/src/gui/foldercreationdialog.h +++ b/src/gui/foldercreationdialog.h @@ -43,6 +43,8 @@ private slots: Ui::FolderCreationDialog *ui; QString _destination; + + void customizeStyle(); }; } From 6b5b241428f0ce65bc7d6a210eb33930ad3d3cbf Mon Sep 17 00:00:00 2001 From: Kevin Beraz Date: Fri, 2 Aug 2024 13:21:15 +0200 Subject: [PATCH 43/45] [SES-58] lower button padding so texts wont get cut off --- src/libsync/ionostheme.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsync/ionostheme.h b/src/libsync/ionostheme.h index d7104f4644770..364ce5e9ac027 100644 --- a/src/libsync/ionostheme.h +++ b/src/libsync/ionostheme.h @@ -74,7 +74,7 @@ class IonosTheme { } static QString buttonPadding() { - return "16px"; + return "10px"; } static QString buttonBorderColor() { From f931b57168f3870e108fab4006cec827d9e4b0d0 Mon Sep 17 00:00:00 2001 From: Kevin Beraz Date: Fri, 2 Aug 2024 13:24:27 +0200 Subject: [PATCH 44/45] [SES-58] set dialog title and adjust positions and sizes --- src/gui/foldercreationdialog.cpp | 7 +++++++ src/gui/foldercreationdialog.ui | 24 ++++++++---------------- 2 files changed, 15 insertions(+), 16 deletions(-) diff --git a/src/gui/foldercreationdialog.cpp b/src/gui/foldercreationdialog.cpp index 4a689d1def49e..86bf423edcd92 100644 --- a/src/gui/foldercreationdialog.cpp +++ b/src/gui/foldercreationdialog.cpp @@ -22,6 +22,7 @@ #include #include #include +#include namespace OCC { @@ -101,10 +102,15 @@ void FolderCreationDialog::customizeStyle() { ui->buttonBox->setLayoutDirection(Qt::RightToLeft); + QDialog *dialog = qobject_cast(this); QPushButton *okButton = ui->buttonBox->button(QDialogButtonBox::Ok); QPushButton *cancelButton = ui->buttonBox->button(QDialogButtonBox::Cancel); QHBoxLayout* buttonlayout = qobject_cast(ui->buttonBox->layout()); + if(dialog){ + dialog->setFixedSize(626, 156); + } + if(buttonlayout){ buttonlayout->setSpacing(16); } @@ -120,4 +126,5 @@ void FolderCreationDialog::customizeStyle() cancelButton->setMinimumHeight(40); cancelButton->setStyleSheet(QStringLiteral("QPushButton") + SesButton::rawSecondaryStyle()); } +} } \ No newline at end of file diff --git a/src/gui/foldercreationdialog.ui b/src/gui/foldercreationdialog.ui index 06f82eaa1fbc4..99984f97e343f 100644 --- a/src/gui/foldercreationdialog.ui +++ b/src/gui/foldercreationdialog.ui @@ -2,24 +2,16 @@ OCC::FolderCreationDialog - - - 0 - 0 - 355 - 138 - - - Create new folder + IONOS EASYSTORAGE Create new folder - 0 + 426 90 341 - 32 + 40 @@ -32,10 +24,10 @@ - 20 + 24 30 - 321 - 22 + 578 + 40 @@ -48,8 +40,8 @@ - 20 - 60 + 24 + 69 321 16 From 9c9fafc85e018fbf5d095a8afce6676bdb793896 Mon Sep 17 00:00:00 2001 From: Kevin Beraz Date: Fri, 2 Aug 2024 14:00:49 +0200 Subject: [PATCH 45/45] [SES-57] reformat file --- src/gui/ignorelisttablewidget.ui | 218 +++++++++++++++---------------- 1 file changed, 109 insertions(+), 109 deletions(-) diff --git a/src/gui/ignorelisttablewidget.ui b/src/gui/ignorelisttablewidget.ui index 1ea59cd4fd844..e586c86ba22a6 100644 --- a/src/gui/ignorelisttablewidget.ui +++ b/src/gui/ignorelisttablewidget.ui @@ -1,112 +1,112 @@ - OCC::IgnoreListTableWidget - - - - 0 - 0 - 342 - 378 - - - - IgnoreListTableWidget - - - - - - true - - - QAbstractItemView::SingleSelection - - - QAbstractItemView::SelectRows - - - 2 - - - - Pattern - - - - - Allow Deletion - - + OCC::IgnoreListTableWidget + + + + 0 + 0 + 342 + 378 + + + + IgnoreListTableWidget + + + + + + true + + + QAbstractItemView::SingleSelection + + + QAbstractItemView::SelectRows + + + 2 + + + + Pattern + + + + + Allow Deletion + + + + + + + + true + + + Add + + + + + + + true + + + Remove + + + + + + + Remove all + + + + + + + true + + + Qt::Vertical + + + + 20 + 322 + + + + + + + + true + + + + 0 + 0 + + + + + + + Qt::PlainText + + + true + + + + - - - - - true - - - Add - - - - - - - true - - - Remove - - - - - - - Remove all - - - - - - - true - - - Qt::Vertical - - - - 20 - 322 - - - - - - - - true - - - - 0 - 0 - - - - - - - Qt::PlainText - - - true - - - - - - - - + + + \ No newline at end of file