From 9778cdf2d6fe2cdeaa6c209b6edaaf584d6b4011 Mon Sep 17 00:00:00 2001 From: Itay Cohen Date: Thu, 7 Feb 2019 20:39:14 +0000 Subject: [PATCH] set ayu default for dark interface (#1174) --- src/common/Configuration.h | 2 +- src/dialogs/WelcomeDialog.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/common/Configuration.h b/src/common/Configuration.h index 67d21383..86857fe7 100644 --- a/src/common/Configuration.h +++ b/src/common/Configuration.h @@ -30,7 +30,6 @@ private: void loadInitial(); // Colors - bool windowColorIsDark(); void loadBaseThemeNative(); void loadBaseThemeDark(); void loadNativeTheme(); @@ -58,6 +57,7 @@ public: void setFont(const QFont &font); // Colors + bool windowColorIsDark(); void setLastThemeOf(const CutterQtTheme &currQtTheme, const QString& theme); QString getLastThemeOf(const CutterQtTheme &currQtTheme) const; const QColor getColor(const QString &name) const; diff --git a/src/dialogs/WelcomeDialog.cpp b/src/dialogs/WelcomeDialog.cpp index 33a4e7e5..dd3d88ad 100644 --- a/src/dialogs/WelcomeDialog.cpp +++ b/src/dialogs/WelcomeDialog.cpp @@ -54,6 +54,11 @@ void WelcomeDialog::on_themeComboBox_currentIndexChanged(int index) { Config()->setTheme(index); + // use "ayu" as the default color theme for dark interface + if (Config()->windowColorIsDark()) { + Config()->setColorTheme("ayu"); + } + // make sure that Cutter's logo changes its color according to the selected theme ui->logoSvgWidget->load(Config()->getLogoFile()); }