Fix labels, lists and other tweaks

This commit is contained in:
2026-01-24 02:21:56 +00:00
parent 5415c71e9e
commit 7830356f24
10 changed files with 100 additions and 27 deletions

View File

@@ -317,4 +317,43 @@ public static class SkiaTheme
internal static readonly SKColor DarkHoverSK = DarkHover.ToSKColor();
#endregion
#region Theme-Aware Helpers
/// <summary>
/// Returns true if dark mode is currently active.
/// </summary>
public static bool IsDarkMode => Application.Current?.UserAppTheme == AppTheme.Dark;
/// <summary>
/// Gets the appropriate button background color for the current theme.
/// </summary>
public static SKColor ButtonBackgroundSK => IsDarkMode ? DarkSurfaceSK : Gray200SK;
/// <summary>
/// Gets the appropriate text color for the current theme.
/// </summary>
public static SKColor CurrentTextSK => IsDarkMode ? DarkTextSK : TextPrimarySK;
/// <summary>
/// Gets the appropriate background color for input controls in the current theme.
/// </summary>
public static SKColor InputBackgroundSK => IsDarkMode ? DarkBackgroundSK : BackgroundWhiteSK;
/// <summary>
/// Gets the appropriate border color for the current theme.
/// </summary>
public static SKColor CurrentBorderSK => IsDarkMode ? Gray600SK : BorderLightSK;
/// <summary>
/// Gets the appropriate surface background for the current theme.
/// </summary>
public static SKColor CurrentSurfaceSK => IsDarkMode ? DarkSurfaceSK : BackgroundWhiteSK;
/// <summary>
/// Gets the appropriate page background for the current theme.
/// </summary>
public static SKColor CurrentPageBackgroundSK => IsDarkMode ? DarkBackgroundSK : BackgroundWhiteSK;
#endregion
}