diff options
author | flow <flowlnlnln@gmail.com> | 2023-01-20 08:36:08 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-20 08:36:08 -0800 |
commit | b9df10c8bd520b4177d3e0cbbc7efe6cbe1da22c (patch) | |
tree | 7218d71ae819d41b30686da6d0bb8d25d003f30a /launcher/ui | |
parent | 1a35fec1341323950eb5cb4ee1d2791b2241db67 (diff) | |
parent | cdc9f93f712081c45f661500e9e6a719eed09b6e (diff) | |
download | PrismLauncher-b9df10c8bd520b4177d3e0cbbc7efe6cbe1da22c.tar.gz PrismLauncher-b9df10c8bd520b4177d3e0cbbc7efe6cbe1da22c.tar.bz2 PrismLauncher-b9df10c8bd520b4177d3e0cbbc7efe6cbe1da22c.zip |
Merge pull request #766 from TayouVR/change-cat-on-settings-change
closes https://github.com/PrismLauncher/PrismLauncher/issues/763
Diffstat (limited to 'launcher/ui')
-rw-r--r-- | launcher/ui/MainWindow.cpp | 5 | ||||
-rw-r--r-- | launcher/ui/MainWindow.h | 2 | ||||
-rw-r--r-- | launcher/ui/pages/global/LauncherPage.cpp | 2 |
3 files changed, 9 insertions, 0 deletions
diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp index 4e830b6c..655e7df0 100644 --- a/launcher/ui/MainWindow.cpp +++ b/launcher/ui/MainWindow.cpp @@ -974,6 +974,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new MainWindow ui->actionCAT->setChecked(cat_enable); // NOTE: calling the operator like that is an ugly hack to appease ancient gcc... connect(ui->actionCAT.operator->(), SIGNAL(toggled(bool)), SLOT(onCatToggled(bool))); + connect(APPLICATION, &Application::currentCatChanged, this, &MainWindow::onCatChanged); setCatBackground(cat_enable); } @@ -2076,6 +2077,10 @@ void MainWindow::newsButtonClicked() news_dialog.exec(); } +void MainWindow::onCatChanged(int) { + setCatBackground(APPLICATION->settings()->get("TheCat").toBool()); +} + void MainWindow::on_actionAbout_triggered() { AboutDialog dialog(this); diff --git a/launcher/ui/MainWindow.h b/launcher/ui/MainWindow.h index 6bf5f428..84b5325a 100644 --- a/launcher/ui/MainWindow.h +++ b/launcher/ui/MainWindow.h @@ -90,6 +90,8 @@ protected: private slots: void onCatToggled(bool); + void onCatChanged(int); + void on_actionAbout_triggered(); void on_actionAddInstance_triggered(); diff --git a/launcher/ui/pages/global/LauncherPage.cpp b/launcher/ui/pages/global/LauncherPage.cpp index 69a8e3df..d8b442fd 100644 --- a/launcher/ui/pages/global/LauncherPage.cpp +++ b/launcher/ui/pages/global/LauncherPage.cpp @@ -106,6 +106,8 @@ LauncherPage::LauncherPage(QWidget *parent) : QWidget(parent), ui(new Ui::Launch } connect(ui->fontSizeBox, SIGNAL(valueChanged(int)), SLOT(refreshFontPreview())); connect(ui->consoleFont, SIGNAL(currentFontChanged(QFont)), SLOT(refreshFontPreview())); + + connect(ui->themeCustomizationWidget, &ThemeCustomizationWidget::currentCatChanged, APPLICATION, &Application::currentCatChanged); } LauncherPage::~LauncherPage() |