From d4b1095173cf32dbd9a890b066d991ca795abd80 Mon Sep 17 00:00:00 2001 From: Kyle Kienapfel Date: Fri, 12 Aug 2022 06:10:18 -0700 Subject: review pass on CheckDarkMode function --- src/yuzu/main.cpp | 6 +++--- src/yuzu/main.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index e473ac6da..5111b0eba 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -257,7 +257,7 @@ static QString PrettyProductName() { return QSysInfo::prettyProductName(); } -bool GMainWindow::check_dark_mode() { +bool GMainWindow::CheckDarkMode() { #ifdef __linux__ const QPalette test_palette(qApp->palette()); const QColor text_color = test_palette.color(QPalette::Active, QPalette::Text); @@ -287,7 +287,7 @@ GMainWindow::GMainWindow(bool has_broken_vulkan) statusBar()->hide(); // Check dark mode before a theme is loaded - os_dark_mode = check_dark_mode(); + os_dark_mode = CheckDarkMode(); startup_icon_theme = QIcon::themeName(); // fallback can only be set once, colorful theme icons are okay on both light/dark QIcon::setFallbackThemeName(QStringLiteral("colorful")); @@ -3979,7 +3979,7 @@ void GMainWindow::UpdateUITheme() { QIcon::setThemeName(current_theme == QStringLiteral("colorful") ? current_theme : startup_icon_theme); QIcon::setThemeSearchPaths(theme_paths); - if (check_dark_mode()) { + if (CheckDarkMode()) { current_theme = QStringLiteral("default_dark"); } } else { diff --git a/src/yuzu/main.h b/src/yuzu/main.h index 2d1c8857b..0b25ebe6c 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h @@ -348,6 +348,7 @@ private: void OpenURL(const QUrl& url); void LoadTranslation(); void OpenPerGameConfiguration(u64 title_id, const std::string& file_name); + bool CheckDarkMode(); QString GetTasStateDescription() const; @@ -395,7 +396,6 @@ private: QString startup_icon_theme; bool os_dark_mode = false; - bool check_dark_mode(); // FS std::shared_ptr vfs; -- cgit v1.2.3