diff --git a/HDPS/src/ApplicationSettingsAction.cpp b/HDPS/src/ApplicationSettingsAction.cpp index a0ad5ad3d..0ad1c21ad 100644 --- a/HDPS/src/ApplicationSettingsAction.cpp +++ b/HDPS/src/ApplicationSettingsAction.cpp @@ -21,7 +21,10 @@ ApplicationSettingsAction::ApplicationSettingsAction(QObject* parent) : bool themesAvailable = false; #ifdef Q_OS_MACX - themesAvailable = macDarkThemeAvailable(); + //themesAvailable = macDarkThemeAvailable(); + // Temporary no option is provided, instead we fix for the light theme. + // While changing the theme works, there is still a number of icons that do not work on dark theme. + macSetToLightTheme(); #endif // Q_OS_MACX if( themesAvailable ) diff --git a/HDPS/src/util/MacThemeHelper.h b/HDPS/src/util/MacThemeHelper.h index dde1c0e81..65229d350 100644 --- a/HDPS/src/util/MacThemeHelper.h +++ b/HDPS/src/util/MacThemeHelper.h @@ -6,5 +6,6 @@ bool macIsInDarkTheme(); void macSetToDarkTheme(); void macSetToLightTheme(); void macSetToAutoTheme(); +void fixCurrentTheme(); -#endif // MAC_THEME_HELPER_H \ No newline at end of file +#endif // MAC_THEME_HELPER_H diff --git a/HDPS/src/util/MacThemeHelper.mm b/HDPS/src/util/MacThemeHelper.mm index d351fc1ca..3567ab2db 100644 --- a/HDPS/src/util/MacThemeHelper.mm +++ b/HDPS/src/util/MacThemeHelper.mm @@ -47,3 +47,21 @@ void macSetToAutoTheme() [NSApp setAppearance:nil]; } } + + +void fixCurrentTheme() +{ + if (__builtin_available(macOS 10.14, *)) + { + auto appearance = [NSApp.effectiveAppearance bestMatchFromAppearancesWithNames: + @[ NSAppearanceNameAqua, NSAppearanceNameDarkAqua ]]; + if([appearance isEqualToString:NSAppearanceNameDarkAqua]) + { + [NSApp setAppearance:[NSAppearance appearanceNamed:NSAppearanceNameDarkAqua]]; + } + else + { + [NSApp setAppearance:[NSAppearance appearanceNamed:NSAppearanceNameAqua]]; + } + } +}