Skip to content

Commit

Permalink
Updated magenats welcome screen
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugen Fischer authored and Eugen Fischer committed Dec 18, 2023
1 parent 55a400d commit 52deb24
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 6 deletions.
27 changes: 24 additions & 3 deletions src/gui/nmcgui/magentaWizardPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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
5 changes: 4 additions & 1 deletion src/gui/nmcgui/magentaWizardPage.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/gui/wizard/owncloudwizard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/gui/wizard/welcomepage.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
3 changes: 3 additions & 0 deletions theme.qrc.in
Original file line number Diff line number Diff line change
Expand Up @@ -238,5 +238,8 @@
<file>theme/delete.svg</file>
<file>theme/send.svg</file>
<file>theme/call-notification.wav</file>
<file>theme/NMCIcons/page1.png</file>
<file>theme/NMCIcons/page2.png</file>
<file>theme/NMCIcons/page3.png</file>
</qresource>
</RCC>

0 comments on commit 52deb24

Please sign in to comment.