From 52deb2437507f8f9de00ca4d625863fe8d977205 Mon Sep 17 00:00:00 2001 From: Eugen Fischer Date: Mon, 18 Dec 2023 16:52:36 +0100 Subject: [PATCH] Updated magenats welcome screen --- src/gui/nmcgui/magentaWizardPage.cpp | 27 ++++++++++++++++++++++++--- src/gui/nmcgui/magentaWizardPage.h | 5 ++++- src/gui/wizard/owncloudwizard.cpp | 2 +- src/gui/wizard/welcomepage.h | 2 +- theme.qrc.in | 3 +++ 5 files changed, 33 insertions(+), 6 deletions(-) diff --git a/src/gui/nmcgui/magentaWizardPage.cpp b/src/gui/nmcgui/magentaWizardPage.cpp index 0c2e00aeb7647..60d1c3ab1a58c 100644 --- a/src/gui/nmcgui/magentaWizardPage.cpp +++ b/src/gui/nmcgui/magentaWizardPage.cpp @@ -23,7 +23,23 @@ namespace OCC { MagentaWizardPage::MagentaWizardPage(OwncloudWizard *ocWizard) : WelcomePage(ocWizard) { + this->layout()->removeItem(_ui->horizontalLayout); + _ui->hostYourOwnServerLabel->setVisible(false); + _ui->loginButton->setVisible(false); + _ui->createAccountButton->setVisible(false); + _ui->slideShow->startShow(2500); + setFinalPage(true); +} + +int MagentaWizardPage::nextId() const +{ + return -1; +} + +bool MagentaWizardPage::isComplete() const +{ + return true; } void MagentaWizardPage::styleSlideShow() @@ -35,14 +51,19 @@ void MagentaWizardPage::styleSlideShow() const QString page2FileName = QString(":/client/theme/NMCIcons/page2.png"); const QString page3FileName = QString(":/client/theme/NMCIcons/page3.png"); - _ui->slideShow->addSlide(page1FileName, tr("Keep your data secure and under your control")); - _ui->slideShow->addSlide(page2FileName, tr("Secure collaboration & file exchange")); - _ui->slideShow->addSlide(page3FileName, tr("Easy-to-use web mail, calendaring & contacts")); + _ui->slideShow->addSlide(page1FileName, tr("Page 1")); + _ui->slideShow->addSlide(page2FileName, tr("Page 2")); + _ui->slideShow->addSlide(page3FileName, tr("Page 3")); const auto isDarkBackground = Theme::isDarkColor(backgroundColor); _ui->slideShowNextButton->setIcon(theme->uiThemeIcon(QString("control-next.svg"), isDarkBackground)); _ui->slideShowPreviousButton->setIcon(theme->uiThemeIcon(QString("control-prev.svg"), isDarkBackground)); } +void MagentaWizardPage::setLoginButtonDefault() +{ + //No login button available, keep empty +} + } // namespace OCC diff --git a/src/gui/nmcgui/magentaWizardPage.h b/src/gui/nmcgui/magentaWizardPage.h index 2824925b1f5c3..d39de06d151f3 100644 --- a/src/gui/nmcgui/magentaWizardPage.h +++ b/src/gui/nmcgui/magentaWizardPage.h @@ -24,9 +24,12 @@ class MagentaWizardPage : public WelcomePage Q_OBJECT public: MagentaWizardPage(OwncloudWizard *ocWizard); + [[nodiscard]] int nextId() const override; + bool isComplete() const override; protected: - void styleSlideShow() override; + void styleSlideShow() override final; + void setLoginButtonDefault() override final; }; } // namespace OCC diff --git a/src/gui/wizard/owncloudwizard.cpp b/src/gui/wizard/owncloudwizard.cpp index 484b622e6ce6d..43d2e5dcf82b1 100644 --- a/src/gui/wizard/owncloudwizard.cpp +++ b/src/gui/wizard/owncloudwizard.cpp @@ -314,7 +314,7 @@ void OwncloudWizard::slotCurrentPageChanged(int id) setNextButtonAsDefault(); } else if (id == WizardCommon::Page_Magenta) { setButtonLayout({ QWizard::Stretch, QWizard::FinishButton }); - setNextButtonAsDefault(); + //setNextButtonAsDefault(); } else { setButtonLayout({ QWizard::BackButton, QWizard::Stretch, QWizard::NextButton }); setNextButtonAsDefault(); diff --git a/src/gui/wizard/welcomepage.h b/src/gui/wizard/welcomepage.h index 3f139f69b3099..209b0a46919e2 100644 --- a/src/gui/wizard/welcomepage.h +++ b/src/gui/wizard/welcomepage.h @@ -35,7 +35,7 @@ class WelcomePage : public QWizardPage ~WelcomePage() override; [[nodiscard]] int nextId() const override; void initializePage() override; - void setLoginButtonDefault(); + virtual void setLoginButtonDefault(); protected: virtual void styleSlideShow(); diff --git a/theme.qrc.in b/theme.qrc.in index e8d88fc8a1b0c..e9a08f373e2cc 100644 --- a/theme.qrc.in +++ b/theme.qrc.in @@ -238,5 +238,8 @@ theme/delete.svg theme/send.svg theme/call-notification.wav + theme/NMCIcons/page1.png + theme/NMCIcons/page2.png + theme/NMCIcons/page3.png