diff options
author | Petr Mrázek <peterix@gmail.com> | 2018-12-24 03:26:14 +0100 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2018-12-24 03:26:14 +0100 |
commit | 2e58429b6a8365e22ec76730f2f0f5d0a6a5b370 (patch) | |
tree | f2202eaa8b1b60addc7617db641c91d50b659845 /application | |
parent | 56a9b65efb59095ba69e023783e51ad4b0a707eb (diff) | |
download | MultiMC-2e58429b6a8365e22ec76730f2f0f5d0a6a5b370.tar MultiMC-2e58429b6a8365e22ec76730f2f0f5d0a6a5b370.tar.gz MultiMC-2e58429b6a8365e22ec76730f2f0f5d0a6a5b370.tar.lz MultiMC-2e58429b6a8365e22ec76730f2f0f5d0a6a5b370.tar.xz MultiMC-2e58429b6a8365e22ec76730f2f0f5d0a6a5b370.zip |
NOISSUE kitty cat in a silly hat!
Diffstat (limited to 'application')
-rw-r--r-- | application/MainWindow.cpp | 10 | ||||
-rw-r--r-- | application/resources/backgrounds/backgrounds.qrc | 1 | ||||
-rw-r--r-- | application/resources/backgrounds/catmas.png | bin | 0 -> 99478 bytes |
3 files changed, 8 insertions, 3 deletions
diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp index f144fcbd..5880762a 100644 --- a/application/MainWindow.cpp +++ b/application/MainWindow.cpp @@ -1245,16 +1245,20 @@ void MainWindow::setCatBackground(bool enabled) { if (enabled) { - view->setStyleSheet(R"( + QDateTime now = QDateTime::currentDateTime(); + QDateTime xmas(QDate(now.date().year(), 12, 25), QTime(0, 0)); + ; + QString cat = (abs(now.daysTo(xmas)) <= 4) ? "catmas" : "kitteh"; + view->setStyleSheet(QString(R"( GroupView { - background-image: url(:/backgrounds/kitteh); + background-image: url(:/backgrounds/%1); background-attachment: fixed; background-clip: padding; background-position: top right; background-repeat: none; background-color:palette(base); -})"); +})").arg(cat)); } else { diff --git a/application/resources/backgrounds/backgrounds.qrc b/application/resources/backgrounds/backgrounds.qrc index 55de139e..83505635 100644 --- a/application/resources/backgrounds/backgrounds.qrc +++ b/application/resources/backgrounds/backgrounds.qrc @@ -2,5 +2,6 @@ <RCC version="1.0"> <qresource prefix="/backgrounds"> <file alias="kitteh">catbgrnd2.png</file> + <file alias="catmas">catmas.png</file> </qresource> </RCC> diff --git a/application/resources/backgrounds/catmas.png b/application/resources/backgrounds/catmas.png Binary files differnew file mode 100644 index 00000000..cca96c63 --- /dev/null +++ b/application/resources/backgrounds/catmas.png |