diff options
Diffstat (limited to 'launcher')
-rw-r--r-- | launcher/Application.cpp | 1 | ||||
-rw-r--r-- | launcher/resources/backgrounds/backgrounds.qrc | 9 | ||||
-rw-r--r-- | launcher/resources/backgrounds/generic.jpg | bin | 0 -> 335269 bytes | |||
-rw-r--r-- | launcher/resources/backgrounds/kitteh-bday.png (renamed from launcher/resources/backgrounds/cattiversary.png) | bin | 99736 -> 99736 bytes | |||
-rw-r--r-- | launcher/resources/backgrounds/kitteh-xmas.png (renamed from launcher/resources/backgrounds/catmas.png) | bin | 72818 -> 72818 bytes | |||
-rw-r--r-- | launcher/resources/backgrounds/kitteh.png (renamed from launcher/resources/backgrounds/catbgrnd2.png) | bin | 62973 -> 62973 bytes | |||
-rw-r--r-- | launcher/resources/backgrounds/rory-bday.png | bin | 0 -> 89472 bytes | |||
-rw-r--r-- | launcher/resources/backgrounds/rory-xmas.png | bin | 0 -> 90158 bytes | |||
-rw-r--r-- | launcher/resources/backgrounds/rory.png | bin | 0 -> 90624 bytes | |||
-rw-r--r-- | launcher/ui/MainWindow.cpp | 17 | ||||
-rw-r--r-- | launcher/ui/pages/global/LauncherPage.cpp | 16 | ||||
-rw-r--r-- | launcher/ui/pages/global/LauncherPage.ui | 33 |
12 files changed, 65 insertions, 11 deletions
diff --git a/launcher/Application.cpp b/launcher/Application.cpp index 2da8ac56..5772d7ca 100644 --- a/launcher/Application.cpp +++ b/launcher/Application.cpp @@ -501,6 +501,7 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv) // Theming m_settings->registerSetting("IconTheme", QString("pe_colored")); m_settings->registerSetting("ApplicationTheme", QString("system")); + m_settings->registerSetting("BackgroundCat", QString("kitteh")); // Remembered state m_settings->registerSetting("LastUsedGroupForNewInstance", QString()); diff --git a/launcher/resources/backgrounds/backgrounds.qrc b/launcher/resources/backgrounds/backgrounds.qrc index 52921512..db48af8b 100644 --- a/launcher/resources/backgrounds/backgrounds.qrc +++ b/launcher/resources/backgrounds/backgrounds.qrc @@ -1,8 +1,11 @@ <!DOCTYPE RCC> <RCC version="1.0"> <qresource prefix="/backgrounds"> - <file alias="kitteh">catbgrnd2.png</file> - <file alias="catmas">catmas.png</file> - <file alias="cattiversary">cattiversary.png</file> + <file alias="kitteh">kitteh.png</file> + <file alias="kitteh-xmas">kitteh-xmas.png</file> + <file alias="kitteh-bday">kitteh-bday.png</file> + <file alias="rory">rory.png</file> + <file alias="rory-xmas">rory-xmas.png</file> + <file alias="rory-bday">rory-bday.png</file> </qresource> </RCC> diff --git a/launcher/resources/backgrounds/generic.jpg b/launcher/resources/backgrounds/generic.jpg Binary files differnew file mode 100644 index 00000000..c4832b0a --- /dev/null +++ b/launcher/resources/backgrounds/generic.jpg diff --git a/launcher/resources/backgrounds/cattiversary.png b/launcher/resources/backgrounds/kitteh-bday.png Binary files differindex 09a36566..09a36566 100644 --- a/launcher/resources/backgrounds/cattiversary.png +++ b/launcher/resources/backgrounds/kitteh-bday.png diff --git a/launcher/resources/backgrounds/catmas.png b/launcher/resources/backgrounds/kitteh-xmas.png Binary files differindex 8bdb1d5c..8bdb1d5c 100644 --- a/launcher/resources/backgrounds/catmas.png +++ b/launcher/resources/backgrounds/kitteh-xmas.png diff --git a/launcher/resources/backgrounds/catbgrnd2.png b/launcher/resources/backgrounds/kitteh.png Binary files differindex e9de7f27..e9de7f27 100644 --- a/launcher/resources/backgrounds/catbgrnd2.png +++ b/launcher/resources/backgrounds/kitteh.png diff --git a/launcher/resources/backgrounds/rory-bday.png b/launcher/resources/backgrounds/rory-bday.png Binary files differnew file mode 100644 index 00000000..c1f576f0 --- /dev/null +++ b/launcher/resources/backgrounds/rory-bday.png diff --git a/launcher/resources/backgrounds/rory-xmas.png b/launcher/resources/backgrounds/rory-xmas.png Binary files differnew file mode 100644 index 00000000..6134c71a --- /dev/null +++ b/launcher/resources/backgrounds/rory-xmas.png diff --git a/launcher/resources/backgrounds/rory.png b/launcher/resources/backgrounds/rory.png Binary files differnew file mode 100644 index 00000000..9dc69354 --- /dev/null +++ b/launcher/resources/backgrounds/rory.png diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp index eda234df..2a6e8c1f 100644 --- a/launcher/ui/MainWindow.cpp +++ b/launcher/ui/MainWindow.cpp @@ -1560,15 +1560,15 @@ 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)); - QString cat; + QString cat = APPLICATION->settings()->get("BackgroundCat").toString(); + + qDebug() << "The choosen cat is " << cat << "."; + if(non_stupid_abs(now.daysTo(xmas)) <= 4) { - cat = "catmas"; + cat += "-xmas"; } else if (non_stupid_abs(now.daysTo(birthday)) <= 12) { - cat = "cattiversary"; - } - else { - cat = "kitteh"; + cat += "-bday"; } view->setStyleSheet(QString(R"( InstanceView @@ -1576,10 +1576,11 @@ InstanceView background-image: url(:/backgrounds/%1); background-attachment: fixed; background-clip: padding; - background-position: top right; + background-position: bottom left; background-repeat: none; background-color:palette(base); -})").arg(cat)); +})") + .arg(cat)); } else { diff --git a/launcher/ui/pages/global/LauncherPage.cpp b/launcher/ui/pages/global/LauncherPage.cpp index 4ae7509c..44421d3b 100644 --- a/launcher/ui/pages/global/LauncherPage.cpp +++ b/launcher/ui/pages/global/LauncherPage.cpp @@ -334,6 +334,15 @@ void LauncherPage::applySettings() APPLICATION->setApplicationTheme(newAppTheme, false); } + switch (ui->themeBackgroundCat->currentIndex()) { + case 0: // original cat + s->set("BackgroundCat", "kitteh"); + break; + case 1: // rory the cat + s->set("BackgroundCat", "rory"); + break; + } + s->set("MenuBarInsteadOfToolBar", ui->preferMenuBarCheckBox->isChecked()); // Console settings @@ -425,6 +434,13 @@ void LauncherPage::loadSettings() ui->themeComboBox->setCurrentIndex(9); } + auto cat = s->get("BackgroundCat").toString(); + if (cat == "kitteh") { + ui->themeBackgroundCat->setCurrentIndex(0); + } else if (cat == "rory") { + ui->themeBackgroundCat->setCurrentIndex(1); + } + { auto currentTheme = s->get("ApplicationTheme").toString(); auto themes = APPLICATION->getValidApplicationThemes(); diff --git a/launcher/ui/pages/global/LauncherPage.ui b/launcher/ui/pages/global/LauncherPage.ui index 76a25f2e..3a4e7da4 100644 --- a/launcher/ui/pages/global/LauncherPage.ui +++ b/launcher/ui/pages/global/LauncherPage.ui @@ -340,6 +340,39 @@ </property> </widget> </item> + <item row="2" column="0"> + <widget class="QLabel" name="label_5"> + <property name="text"> + <string>Cat</string> + </property> + <property name="buddy"> + <cstring>themeBackgroundCat</cstring> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QComboBox" name="themeBackgroundCat"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="focusPolicy"> + <enum>Qt::StrongFocus</enum> + </property> + <item> + <property name="text"> + <string>Background Cat (from MultiMC)</string> + </property> + </item> + <item> + <property name="text"> + <string>Rory ID 11 (drawn by Ashtaka)</string> + </property> + </item> + </widget> + </item> </layout> </widget> </item> |