aboutsummaryrefslogtreecommitdiff
path: root/launcher/ui
diff options
context:
space:
mode:
authorTayou <tayou@gmx.net>2023-01-09 18:40:58 +0100
committerTayou <tayou@gmx.net>2023-01-10 16:09:57 +0100
commit668b19d11948bedeff6908d76d63f5a5fad4eb02 (patch)
treea29cd115dbda66337904339d103c6a5938b99d5e /launcher/ui
parent5c48f0b458c8b4e9306b6791b228285b6c7f4586 (diff)
downloadPrismLauncher-668b19d11948bedeff6908d76d63f5a5fad4eb02.tar.gz
PrismLauncher-668b19d11948bedeff6908d76d63f5a5fad4eb02.tar.bz2
PrismLauncher-668b19d11948bedeff6908d76d63f5a5fad4eb02.zip
Add hint about Cat
Signed-off-by: Tayou <tayou@gmx.net>
Diffstat (limited to 'launcher/ui')
-rw-r--r--launcher/ui/setupwizard/ThemeWizardPage.ui15
-rw-r--r--launcher/ui/widgets/ThemeCustomizationWidget.cpp14
-rw-r--r--launcher/ui/widgets/ThemeCustomizationWidget.h2
-rw-r--r--launcher/ui/widgets/ThemeCustomizationWidget.ui51
4 files changed, 62 insertions, 20 deletions
diff --git a/launcher/ui/setupwizard/ThemeWizardPage.ui b/launcher/ui/setupwizard/ThemeWizardPage.ui
index 1ab04fc8..01394ea4 100644
--- a/launcher/ui/setupwizard/ThemeWizardPage.ui
+++ b/launcher/ui/setupwizard/ThemeWizardPage.ui
@@ -32,6 +32,16 @@
</widget>
</item>
<item>
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>Hint: The cat appears in the background and is not shown by default. It is only made visible when pressing the Cat button in the Toolbar.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
@@ -41,7 +51,7 @@
<item>
<widget class="QLabel" name="label_4">
<property name="text">
- <string>Icon Preview:</string>
+ <string> Preview:</string>
</property>
</widget>
</item>
@@ -317,6 +327,9 @@
<height>256</height>
</size>
</property>
+ <property name="toolTip">
+ <string>The cat appears in the background and does not serve a purpose, it is purely visual.</string>
+ </property>
<property name="text">
<string/>
</property>
diff --git a/launcher/ui/widgets/ThemeCustomizationWidget.cpp b/launcher/ui/widgets/ThemeCustomizationWidget.cpp
index d0b5be21..dcf13303 100644
--- a/launcher/ui/widgets/ThemeCustomizationWidget.cpp
+++ b/launcher/ui/widgets/ThemeCustomizationWidget.cpp
@@ -72,10 +72,11 @@ void ThemeCustomizationWidget::showFeatures(ThemeFields features) {
void ThemeCustomizationWidget::applyIconTheme(int index) {
auto settings = APPLICATION->settings();
- auto original = settings->get("IconTheme").toString();
- settings->set("IconTheme", m_iconThemeOptions[index].first);
+ auto originalIconTheme = settings->get("IconTheme").toString();
+ auto& newIconTheme = m_iconThemeOptions[index].first;
+ settings->set("IconTheme", newIconTheme);
- if (original != settings->get("IconTheme")) {
+ if (originalIconTheme != newIconTheme) {
APPLICATION->applyCurrentlySelectedTheme();
}
@@ -113,7 +114,8 @@ void ThemeCustomizationWidget::loadSettings()
auto iconTheme = settings->get("IconTheme").toString();
for (auto& iconThemeFromList : m_iconThemeOptions) {
- ui->iconsComboBox->addItem(QIcon(QString(":/icons/%1/scalable/settings").arg(iconThemeFromList.first)), iconThemeFromList.second);
+ QIcon iconForComboBox = QIcon(QString(":/icons/%1/scalable/settings").arg(iconThemeFromList.first));
+ ui->iconsComboBox->addItem(iconForComboBox, iconThemeFromList.second);
if (iconTheme == iconThemeFromList.first) {
ui->iconsComboBox->setCurrentIndex(ui->iconsComboBox->count() - 1);
}
@@ -134,8 +136,8 @@ void ThemeCustomizationWidget::loadSettings()
auto cat = settings->get("BackgroundCat").toString();
for (auto& catFromList : m_catOptions) {
- ui->backgroundCatComboBox->addItem(QIcon(QString(":/backgrounds/%1").arg(ThemeManager::getCatImage(catFromList.first))),
- catFromList.second);
+ QIcon catIcon = QIcon(QString(":/backgrounds/%1").arg(ThemeManager::getCatImage(catFromList.first)));
+ ui->backgroundCatComboBox->addItem(catIcon, catFromList.second);
if (cat == catFromList.first) {
ui->backgroundCatComboBox->setCurrentIndex(ui->backgroundCatComboBox->count() - 1);
}
diff --git a/launcher/ui/widgets/ThemeCustomizationWidget.h b/launcher/ui/widgets/ThemeCustomizationWidget.h
index be2c4492..d955a266 100644
--- a/launcher/ui/widgets/ThemeCustomizationWidget.h
+++ b/launcher/ui/widgets/ThemeCustomizationWidget.h
@@ -74,4 +74,4 @@ class ThemeCustomizationWidget : public QWidget {
{ "rory-flat", QObject::tr("Rory ID 11 (flat edition, drawn by Ashtaka)") },
{ "teawie", QObject::tr("Teawie (drawn by SympathyTea)") }
};
-}; \ No newline at end of file
+};
diff --git a/launcher/ui/widgets/ThemeCustomizationWidget.ui b/launcher/ui/widgets/ThemeCustomizationWidget.ui
index b2772983..f216a610 100644
--- a/launcher/ui/widgets/ThemeCustomizationWidget.ui
+++ b/launcher/ui/widgets/ThemeCustomizationWidget.ui
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>400</width>
- <height>311</height>
+ <height>191</height>
</rect>
</property>
<property name="windowTitle">
@@ -77,6 +77,9 @@
</item>
<item row="2" column="0">
<widget class="QLabel" name="backgroundCatLabel">
+ <property name="toolTip">
+ <string>The cat appears in the background and is not shown by default. It is only made visible when pressing the Cat button in the Toolbar.</string>
+ </property>
<property name="text">
<string>C&amp;at</string>
</property>
@@ -86,17 +89,41 @@
</widget>
</item>
<item row="2" column="1">
- <widget class="QComboBox" name="backgroundCatComboBox">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="focusPolicy">
- <enum>Qt::StrongFocus</enum>
- </property>
- </widget>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QComboBox" name="backgroundCatComboBox">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="focusPolicy">
+ <enum>Qt::StrongFocus</enum>
+ </property>
+ <property name="toolTip">
+ <string>The cat appears in the background and is not shown by default. It is only made visible when pressing the Cat button in the Toolbar.</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="catInfoLabel">
+ <property name="toolTip">
+ <string>The cat appears in the background and is not shown by default. It is only made visible when pressing the Cat button in the Toolbar.</string>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="icon">
+ <iconset theme="about">
+ <normaloff>.</normaloff>.</iconset>
+ </property>
+ <property name="flat">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
</layout>
</widget>