aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui/setupwizard/ThemeWizardPage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'launcher/ui/setupwizard/ThemeWizardPage.cpp')
-rw-r--r--launcher/ui/setupwizard/ThemeWizardPage.cpp27
1 files changed, 4 insertions, 23 deletions
diff --git a/launcher/ui/setupwizard/ThemeWizardPage.cpp b/launcher/ui/setupwizard/ThemeWizardPage.cpp
index 4e1eb488..cc2d335b 100644
--- a/launcher/ui/setupwizard/ThemeWizardPage.cpp
+++ b/launcher/ui/setupwizard/ThemeWizardPage.cpp
@@ -20,6 +20,7 @@
#include "Application.h"
#include "ui/themes/ITheme.h"
+#include "ui/themes/ThemeManager.h"
#include "ui/widgets/ThemeCustomizationWidget.h"
#include "ui_ThemeCustomizationWidget.h"
@@ -27,8 +28,8 @@ ThemeWizardPage::ThemeWizardPage(QWidget* parent) : BaseWizardPage(parent), ui(n
{
ui->setupUi(this);
- connect(ui->themeCustomizationWidget, QOverload<int>::of(&ThemeCustomizationWidget::currentIconThemeChanged), this, &ThemeWizardPage::updateIcons);
- connect(ui->themeCustomizationWidget, QOverload<int>::of(&ThemeCustomizationWidget::currentCatChanged), this, &ThemeWizardPage::updateCat);
+ connect(ui->themeCustomizationWidget, &ThemeCustomizationWidget::currentIconThemeChanged, this, &ThemeWizardPage::updateIcons);
+ connect(ui->themeCustomizationWidget, &ThemeCustomizationWidget::currentCatChanged, this, &ThemeWizardPage::updateCat);
updateIcons();
updateCat();
@@ -39,13 +40,6 @@ ThemeWizardPage::~ThemeWizardPage()
delete ui;
}
-void ThemeWizardPage::initializePage() {}
-
-bool ThemeWizardPage::validatePage()
-{
- return true;
-}
-
void ThemeWizardPage::updateIcons()
{
qDebug() << "Setting Icons";
@@ -67,20 +61,7 @@ void ThemeWizardPage::updateIcons()
void ThemeWizardPage::updateCat()
{
qDebug() << "Setting Cat";
-
- QDateTime now = QDateTime::currentDateTime();
- QDateTime birthday(QDate(now.date().year(), 11, 30), QTime(0, 0));
- QDateTime xmas(QDate(now.date().year(), 12, 25), QTime(0, 0));
- QDateTime halloween(QDate(now.date().year(), 10, 31), QTime(0, 0));
- QString cat = APPLICATION->settings()->get("BackgroundCat").toString();
- if (std::abs(now.daysTo(xmas)) <= 4) {
- cat += "-xmas";
- } else if (std::abs(now.daysTo(halloween)) <= 4) {
- cat += "-spooky";
- } else if (std::abs(now.daysTo(birthday)) <= 12) {
- cat += "-bday";
- }
- ui->catImagePreviewButton->setIcon(QIcon(QString(R"(:/backgrounds/%1)").arg(cat)));
+ ui->catImagePreviewButton->setIcon(QIcon(QString(R"(:/backgrounds/%1)").arg(ThemeManager::getCatImage())));
}
void ThemeWizardPage::retranslate()