mirror of
https://github.com/stenzek/duckstation.git
synced 2026-02-13 01:44:33 +00:00
Qt: NativeThemeStylesheetNeedsUpdate() should not apply to Fusion
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user