diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-11-05 11:17:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-05 11:17:13 +0100 |
commit | ba8322aa5cd082b9785869582bbce73a624988e0 (patch) | |
tree | c42c499deab70115fc662c89fb028392c37937c4 | |
parent | e4bd82190aff5c3293e21808a64bd81956f17b16 (diff) | |
parent | 9f5537d936da565d8c8df615fb7c9db0a5caf847 (diff) | |
download | PrismLauncher-ba8322aa5cd082b9785869582bbce73a624988e0.tar.gz PrismLauncher-ba8322aa5cd082b9785869582bbce73a624988e0.tar.bz2 PrismLauncher-ba8322aa5cd082b9785869582bbce73a624988e0.zip |
Merge pull request #396 from leozamboni/develop
-rw-r--r-- | launcher/resources/backgrounds/backgrounds.qrc | 1 | ||||
-rw-r--r-- | launcher/resources/backgrounds/kitteh-ween.png | bin | 0 -> 94677 bytes | |||
-rw-r--r-- | launcher/ui/MainWindow.cpp | 9 |
3 files changed, 6 insertions, 4 deletions
diff --git a/launcher/resources/backgrounds/backgrounds.qrc b/launcher/resources/backgrounds/backgrounds.qrc index fb426707..652e7084 100644 --- a/launcher/resources/backgrounds/backgrounds.qrc +++ b/launcher/resources/backgrounds/backgrounds.qrc @@ -4,6 +4,7 @@ <file alias="kitteh">kitteh.png</file> <file alias="kitteh-xmas">kitteh-xmas.png</file> <file alias="kitteh-bday">kitteh-bday.png</file> + <file alias="kitteh-ween">kitteh-ween.png</file> <file alias="rory">rory.png</file> <file alias="rory-xmas">rory-xmas.png</file> <file alias="rory-bday">rory-bday.png</file> diff --git a/launcher/resources/backgrounds/kitteh-ween.png b/launcher/resources/backgrounds/kitteh-ween.png Binary files differnew file mode 100644 index 00000000..deb0bebb --- /dev/null +++ b/launcher/resources/backgrounds/kitteh-ween.png diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp index 28eaa741..afbc505e 100644 --- a/launcher/ui/MainWindow.cpp +++ b/launcher/ui/MainWindow.cpp @@ -1560,12 +1560,13 @@ void MainWindow::setCatBackground(bool enabled) 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(non_stupid_abs(now.daysTo(xmas)) <= 4) { + if (non_stupid_abs(now.daysTo(xmas)) <= 4) { cat += "-xmas"; - } - else if (non_stupid_abs(now.daysTo(birthday)) <= 12) { + } else if (cat == "kitteh" && non_stupid_abs(now.daysTo(halloween)) <= 4) { + cat += "-ween"; + } else if (non_stupid_abs(now.daysTo(birthday)) <= 12) { cat += "-bday"; } view->setStyleSheet(QString(R"( |