fix: Theme detection issues on all OSes

This commit is contained in:
WerWolv
2022-06-30 15:09:57 +02:00
parent 19f99bab0c
commit bb429aae62
5 changed files with 20 additions and 3 deletions

View File

@@ -34,6 +34,8 @@ static void detectSystemTheme() {
auto error = RegQueryValueEx(hkey, "AppsUseLightTheme", nullptr, nullptr, reinterpret_cast<LPBYTE>(&value), &size);
if (error == ERROR_SUCCESS) {
EventManager::post<RequestChangeTheme>(value == 0 ? 1 : 2);
} else {
EventManager::post<RequestChangeTheme>(1);
}
}
});