diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2023-08-12 20:04:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-12 20:04:03 +0200 |
| commit | dfbc0e33d70a94124cd4a9176d9f544365a66bd2 (patch) | |
| tree | 7e8958b888a10785a44cff2972b27e7fc5e62622 /Source/Core/DolphinQt/Main.cpp | |
| parent | 44c90aa3fc7e9fe12a87b01a8dcde8e96dac9617 (diff) | |
| parent | 24012cfc7f396177732e9a8b7d849045a65a5512 (diff) | |
Merge pull request #12080 from AdmiralCurtiss/windark
Add custom dark theme for Windows.
Diffstat (limited to 'Source/Core/DolphinQt/Main.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Main.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/Core/DolphinQt/Main.cpp b/Source/Core/DolphinQt/Main.cpp index 1c658e8d62..39aa5c6f1f 100644 --- a/Source/Core/DolphinQt/Main.cpp +++ b/Source/Core/DolphinQt/Main.cpp @@ -2,11 +2,11 @@ // SPDX-License-Identifier: GPL-2.0-or-later #ifdef _WIN32 +#include <cstdio> #include <string> #include <vector> #include <Windows.h> -#include <cstdio> #endif #ifdef __linux__ @@ -33,6 +33,7 @@ #include "DolphinQt/MainWindow.h" #include "DolphinQt/QtUtils/ModalMessageBox.h" #include "DolphinQt/QtUtils/RunOnObject.h" +#include "DolphinQt/QtUtils/SetWindowDecorations.h" #include "DolphinQt/Resources.h" #include "DolphinQt/Settings.h" #include "DolphinQt/Translation.h" @@ -90,6 +91,7 @@ static bool QtMsgAlertHandler(const char* caption, const char* text, bool yes_no return QMessageBox::NoIcon; }()); + SetQWidgetWindowDecorations(&message_box); const int button = message_box.exec(); if (button == QMessageBox::Yes) return true; @@ -243,8 +245,11 @@ int main(int argc, char* argv[]) { DolphinAnalytics::Instance().ReportDolphinStart("qt"); - MainWindow win{std::move(boot), static_cast<const char*>(options.get("movie"))}; + Settings::Instance().InitDefaultPalette(); + Settings::Instance().UpdateSystemDark(); Settings::Instance().SetCurrentUserStyle(Settings::Instance().GetCurrentUserStyle()); + + MainWindow win{std::move(boot), static_cast<const char*>(options.get("movie"))}; win.Show(); #if defined(USE_ANALYTICS) && USE_ANALYTICS @@ -268,6 +273,7 @@ int main(int argc, char* argv[]) "This authorization can be revoked at any time through Dolphin's " "settings.")); + SetQWidgetWindowDecorations(&analytics_prompt); const int answer = analytics_prompt.exec(); Config::SetBase(Config::MAIN_ANALYTICS_PERMISSION_ASKED, true); |
