Permalink
Browse files

NOISSUE kitty cat in a silly hat!

  • Loading branch information...
peterix committed Dec 24, 2018
1 parent 56a9b65 commit 2e58429b6a8365e22ec76730f2f0f5d0a6a5b370
@@ -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
{
@@ -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>
Binary file not shown.

2 comments on commit 2e58429

@spannerman79

This comment has been minimized.

Copy link

spannerman79 replied Dec 24, 2018

🤣

@Zer0Lyfe

This comment has been minimized.

Copy link

Zer0Lyfe replied Jan 3, 2019

oh god 😆

Please sign in to comment.