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..7288aba3e5c2c 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" ) @@ -15,8 +15,8 @@ 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_ENFORCE ON ) # If set and APPLICATION_SERVER_URL is defined, the server can only connect to the pre-defined URL +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 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 ) 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/foldercreationdialog.cpp b/src/gui/foldercreationdialog.cpp index a245c9f4dc461..86bf423edcd92 100644 --- a/src/gui/foldercreationdialog.cpp +++ b/src/gui/foldercreationdialog.cpp @@ -14,12 +14,15 @@ #include "foldercreationdialog.h" #include "ui_foldercreationdialog.h" +#include "ionostheme.h" +#include "sesButton.h" #include #include #include #include +#include namespace OCC { @@ -32,9 +35,12 @@ FolderCreationDialog::FolderCreationDialog(const QString &destination, QWidget * { ui->setupUi(this); + customizeStyle(); + ui->labelErrorMessage->setVisible(false); setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); + setWindowFlags(windowFlags() | Qt::Dialog | Qt::WindowMinMaxButtonsHint); connect(ui->newFolderNameEdit, &QLineEdit::textChanged, this, &FolderCreationDialog::slotNewFolderNameEditTextEdited); @@ -92,4 +98,33 @@ void FolderCreationDialog::slotNewFolderNameEditTextEdited() } } +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); + } + + 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(); }; } diff --git a/src/gui/foldercreationdialog.ui b/src/gui/foldercreationdialog.ui index 84d7c77e18654..99984f97e343f 100644 --- a/src/gui/foldercreationdialog.ui +++ b/src/gui/foldercreationdialog.ui @@ -1,100 +1,92 @@ - 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 + + + IONOS EASYSTORAGE Create new folder + + + + + 426 + 90 + 341 + 40 + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + 24 + 30 + 578 + 40 + + + + Enter folder name + + + + + true + + + + 24 + 69 + 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 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 diff --git a/src/gui/sesButton.cpp b/src/gui/sesButton.cpp new file mode 100644 index 0000000000000..a01b238f0702c --- /dev/null +++ b/src/gui/sesButton.cpp @@ -0,0 +1,93 @@ +#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); + } + } + + QString SesButton::rawPrimaryStyle(){ + return QStringLiteral( + "{" + "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() + ); + } + + 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;" + "padding: %8; }") + .arg( + IonosTheme::white() + , IonosTheme::black() + , IonosTheme::settingsFont() + , IonosTheme::buttonFontSize() + , IonosTheme::buttonFontWeight() + , IonosTheme::buttonRadius() + , IonosTheme::buttonBorderColor() + , IonosTheme::buttonPadding() + ); + } + + QString SesButton::rawDisabledStyle(){ + return QStringLiteral( + "{" + "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() + ); + } + + 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; + } + 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..3e73f9dfcfd86 --- /dev/null +++ b/src/gui/sesButton.h @@ -0,0 +1,39 @@ +#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); + static QString rawPrimaryStyle(); + static QString rawSecondaryStyle(); + static QString rawDisabledStyle(); + 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/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 diff --git a/src/gui/tray/UserLine.qml b/src/gui/tray/UserLine.qml index 954d7b19a599e..283bc49c70fa4 100644 --- a/src/gui/tray/UserLine.qml +++ b/src/gui/tray/UserLine.qml @@ -129,8 +129,13 @@ AbstractButton { id: userMoreButtonMenu closePolicy: Menu.CloseOnPressOutsideParent | Menu.CloseOnEscape + background: Rectangle { + radius: Style.sesCornerRadius + border.color: Style.sesBorderColor + } + MenuItem { - visible: model.isConnected && model.serverHasUserStatus + visible: false height: visible ? implicitHeight : 0 text: qsTr("Set status") font.pixelSize: Style.topLinePixelSize @@ -140,6 +145,13 @@ AbstractButton { } MenuItem { + id: logInOutButton + + property bool isHovered: logInOutButton.hovered || logInOutButton.visualFocus + property bool isActive: logInOutButton.pressed + + icon.source: Style.sesLogout + 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 @@ -153,27 +165,25 @@ 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" + 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") - - onPressed: { - if (model.isConnected) { - UserModel.logout(index) - } else { - UserModel.login(index) - } - accountMenu.close() - } } MenuItem { + + property bool isHovered: removeAccountButton.hovered || removeAccountButton.visualFocus + property bool isActive: removeAccountButton.pressed + id: removeAccountButton + icon.source: Style.sesDelete + icon.color: removeAccountButton.isActive ? Style.sesIconActive : Style.sesIconColor text: qsTr("Remove account") font.pixelSize: Style.topLinePixelSize palette.windowText: Style.ncTextColor @@ -187,13 +197,14 @@ 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" + 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() } diff --git a/src/gui/wizard/owncloudadvancedsetuppage.cpp b/src/gui/wizard/owncloudadvancedsetuppage.cpp index fd19ec8e9efab..06353ab52a4e8 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 { @@ -49,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); @@ -77,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); @@ -89,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(); @@ -196,7 +195,7 @@ void OwncloudAdvancedSetupPage::initializePage() _ui.confSpinBox->setValue(newFolderLimit.second); _ui.confCheckBoxExternal->setChecked(cfgFile.confirmExternalStorage()); - fetchUserAvatar(); + SetAvatarIcon(); setUserInformation(); customizeStyle(); @@ -219,6 +218,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 @@ -580,16 +585,34 @@ 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(); } 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 +631,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/gui/wizard/owncloudadvancedsetuppage.ui b/src/gui/wizard/owncloudadvancedsetuppage.ui index 5f51a2d824e10..01bf89edc7ac0 100644 --- a/src/gui/wizard/owncloudadvancedsetuppage.ui +++ b/src/gui/wizard/owncloudadvancedsetuppage.ui @@ -1,749 +1,673 @@ - 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 + + + + + + + + + + + + + + 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 + + + + + + + + + + + + 32 + + + 32 + + + + + 0 + + + + + Synchronize everything from server + + + true + + + + + + + Size + + + Qt::PlainText + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + + + + + + 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 + + + + + + + + + + + + Ask before syncing external storages + + + 32 + + + + + + + + + 8 + + + + + + 0 + 0 + + + + Choose what to sync + + + 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 + + + + + + + + + + + + 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 diff --git a/src/gui/wizard/owncloudwizard.cpp b/src/gui/wizard/owncloudwizard.cpp index 238286aa0accd..31b5ba4bae20e 100644 --- a/src/gui/wizard/owncloudwizard.cpp +++ b/src/gui/wizard/owncloudwizard.cpp @@ -26,6 +26,8 @@ #include "wizard/owncloudadvancedsetuppage.h" #include "wizard/webviewpage.h" #include "wizard/flow2authcredspage.h" +#include "ionostheme.h" +#include "sesButton.h" #include "common/vfs.h" @@ -322,6 +324,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(); @@ -332,6 +338,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) { @@ -406,12 +416,33 @@ 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); 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() diff --git a/src/gui/wizard/welcomepage.cpp b/src/gui/wizard/welcomepage.cpp index 0186016358085..361d20245fabb 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 { @@ -65,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)); diff --git a/src/gui/wizard/welcomepage.ui b/src/gui/wizard/welcomepage.ui index e2e920aa315d3..4b1e18bc6cf94 100644 --- a/src/gui/wizard/welcomepage.ui +++ b/src/gui/wizard/welcomepage.ui @@ -1,229 +1,257 @@ - 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 + 626 + 450 + + + + + 0 + 0 + + + + Form + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 129 + + + + + + + + 0 + + + + + + 40 + 16777215 + + + + + + + false + + + false + + + true + + + + + + + + 12 + 75 + true + + + + + 287 + + + + + + + + + 40 + 16777215 + + + + + + + false + + + false + + + true + + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 20 + 119 + + + + + + + + 0 + + + 0 + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + 0 + + + + + Qt::Vertical + + + + 20 + 0 + + + + + + + + OCC::ButtonStyle::Primary + + + Log in + + + true + + + true + + + + + + + Sign up with provider + + + true + + + false + + + + + + + + + + Qt::Vertical + + + + 20 + 0 + + + + + + + + + + Qt::Horizontal + + + + 40 + 0 + + + + + + + + + + Qt::Vertical + + + QSizePolicy::Fixed + + + + 20 + 0 + + + + + + + + + OCC::SlideShow + QWidget +
wizard/slideshow.h
+
+ + OCC::LinkLabel + QWidget +
wizard/linklabel.h
+ 1 +
+
+ + + \ No newline at end of file diff --git a/src/libsync/ionostheme.h b/src/libsync/ionostheme.h index 525aa56f4b595..364ce5e9ac027 100644 --- a/src/libsync/ionostheme.h +++ b/src/libsync/ionostheme.h @@ -1,8 +1,26 @@ +#ifndef _IONOSTHEME_H +#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"; } @@ -39,6 +57,52 @@ 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 "10px"; + } + + 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"; + } + + static QString welcomeBackgroundColor() { + return "#FAFAFA"; + } + private: IonosTheme() {} -}; \ No newline at end of file +}; +} +#endif // _IONOSTHEME_H \ No newline at end of file diff --git a/theme.qrc.in b/theme.qrc.in index 842fd5506dcd5..b58a6ca0f5721 100644 --- a/theme.qrc.in +++ b/theme.qrc.in @@ -245,11 +245,16 @@ 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 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/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/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 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-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-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 @@ + + + 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 @@ + + +