Skip to content

Commit

Permalink
Fixed pixmap size
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugen Fischer authored and Eugen Fischer committed Jan 6, 2024
1 parent 8a5f12c commit 24ca5b0
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/gui/nmcgui/magentaWizardPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ MagentaWizardPage::MagentaWizardPage(OwncloudWizard *ocWizard)
_ui->hostYourOwnServerLabel->setVisible(false);
_ui->loginButton->setVisible(false);
_ui->createAccountButton->setVisible(false);
_ui->slideShow->startShow(2500);
_ui->slideShow->startShow();
_ui->slideShow->setInterval(2500);

setFinalPage(true);
}
Expand All @@ -47,13 +48,13 @@ void MagentaWizardPage::styleSlideShow()
const auto theme = Theme::instance();
const auto backgroundColor = palette().window().color();

const QString page1FileName = QString(":/client/theme/NMCIcons/page1.png");
const QString page2FileName = QString(":/client/theme/NMCIcons/page2.png");
const QString page3FileName = QString(":/client/theme/NMCIcons/page3.png");
QPixmap page1Pixmap = QString(":/client/theme/NMCIcons/page1.png");
QPixmap page2Pixmap = QString(":/client/theme/NMCIcons/page2.png");
QPixmap page3Pixmap = QString(":/client/theme/NMCIcons/page3.png");

_ui->slideShow->addSlide(page1FileName, tr("Page 1"));
_ui->slideShow->addSlide(page2FileName, tr("Page 2"));
_ui->slideShow->addSlide(page3FileName, tr("Page 3"));
_ui->slideShow->addSlide(page1Pixmap.scaled(page1Pixmap.size()*0.33, Qt::KeepAspectRatio,Qt::SmoothTransformation), tr("PAGE_1_WIZARD"));
_ui->slideShow->addSlide(page2Pixmap.scaled(page2Pixmap.size()*0.33, Qt::KeepAspectRatio,Qt::SmoothTransformation), tr("PAGE_2_WIZARD"));
_ui->slideShow->addSlide(page3Pixmap.scaled(page3Pixmap.size()*0.33, Qt::KeepAspectRatio,Qt::SmoothTransformation), tr("PAGE_3_WIZARD"));

const auto isDarkBackground = Theme::isDarkColor(backgroundColor);
_ui->slideShowNextButton->setIcon(theme->uiThemeIcon(QString("control-next.svg"), isDarkBackground));
Expand Down

0 comments on commit 24ca5b0

Please sign in to comment.