Qt: NativeThemeStylesheetNeedsUpdate() should not apply to Fusion

wip2
Stenzek 5 days ago
parent 0776e2f9c3
commit 2fb3773591
No known key found for this signature in database

@ -354,6 +354,9 @@ bool IsStyleSheetApplicationTheme();
/// Sets the icon theme, based on the current style (light/dark).
void UpdateThemeOnStyleChange();
/// Returns true if using the native theme and it has stylesheet overrides.
bool NativeThemeStylesheetNeedsUpdate();
/// Sets batch mode (exit after game shutdown).
bool InBatchMode();

@ -18,7 +18,6 @@ namespace QtHost {
static void SetThemeAttributes(bool is_stylesheet_theme, bool is_variable_color_theme, bool is_dark_theme);
static void SetStyleFromSettings();
static QString GetNativeThemeStylesheet();
static bool NativeThemeStylesheetNeedsUpdate();
namespace {
struct State
@ -561,7 +560,8 @@ bool QtHost::NativeThemeStylesheetNeedsUpdate()
{
#ifdef __APPLE__
// See below, only used on MacOS.
return s_state.is_variable_color_theme;
// objectName() is empty after applying stylesheet.
return (s_state.is_variable_color_theme && QApplication::style()->objectName().isEmpty());
#else
return false;
#endif

Loading…
Cancel
Save