aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui/GpgFrontendUIInit.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-01-23 08:44:53 +0000
committersaturneric <[email protected]>2024-01-23 08:44:53 +0000
commit04c3393aefc4b5d2c0c20f136835cd477bbda0f8 (patch)
treecf899de6cdbf65d16112c6af54c33b92a7a932ac /src/ui/GpgFrontendUIInit.cpp
parentfix: set gpgconf path to gpgme engine (diff)
downloadGpgFrontend-04c3393aefc4b5d2c0c20f136835cd477bbda0f8.tar.gz
GpgFrontend-04c3393aefc4b5d2c0c20f136835cd477bbda0f8.zip
feat: support dark mode on windows
Diffstat (limited to 'src/ui/GpgFrontendUIInit.cpp')
-rw-r--r--src/ui/GpgFrontendUIInit.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/ui/GpgFrontendUIInit.cpp b/src/ui/GpgFrontendUIInit.cpp
index eca77b76..5d91c55e 100644
--- a/src/ui/GpgFrontendUIInit.cpp
+++ b/src/ui/GpgFrontendUIInit.cpp
@@ -106,6 +106,15 @@ void InitGpgFrontendUI(QApplication* /*app*/) {
// init locale
InitLocale();
+#ifdef WINDOWS
+ // support dark mode on windows
+ QApplication::setStyle("fusion");
+#endif
+
+ // register meta types
+ qRegisterMetaType<QSharedPointer<GpgPassphraseContext> >(
+ "QSharedPointer<GpgPassphraseContext>");
+
// init signal station
UISignalStation::GetInstance();
@@ -172,9 +181,6 @@ void InitGpgFrontendUI(QApplication* /*app*/) {
0) {
WaitEnvCheckingProcess();
}
-
- qRegisterMetaType<QSharedPointer<GpgPassphraseContext> >(
- "QSharedPointer<GpgPassphraseContext>");
}
auto RunGpgFrontendUI(QApplication* app) -> int {