Fixes for GTK - still wrong

This commit is contained in:
2026-01-24 06:13:13 +00:00
parent 38c48fc99f
commit f1e3630d1b
11 changed files with 845 additions and 41 deletions

View File

@@ -322,8 +322,23 @@ public static class SkiaTheme
/// <summary>
/// Returns true if dark mode is currently active.
/// Checks UserAppTheme first, falls back to system RequestedTheme.
/// </summary>
public static bool IsDarkMode => Application.Current?.UserAppTheme == AppTheme.Dark;
public static bool IsDarkMode
{
get
{
var app = Application.Current;
if (app == null) return false;
// If user explicitly set a theme, use that
if (app.UserAppTheme != AppTheme.Unspecified)
return app.UserAppTheme == AppTheme.Dark;
// Otherwise use system theme
return app.RequestedTheme == AppTheme.Dark;
}
}
/// <summary>
/// Gets the appropriate button background color for the current theme.