diff --git a/App/MAS_GUI.ps1 b/App/MAS_GUI.ps1 index 54ed4a4..8d3672e 100644 --- a/App/MAS_GUI.ps1 +++ b/App/MAS_GUI.ps1 @@ -2,7 +2,7 @@ .SYNOPSIS Win11 Style GUI for Microsoft Activation Scripts (MAS) .DESCRIPTION - A modern, Fluent-inspired interface for MAS with auto-detection of system status. + A modern, Fluent-inspired interface for MAS with auto-detection of system status and dynamic theming. #> # --- Self-Elevation --- @@ -21,7 +21,7 @@ Add-Type -AssemblyName System.Drawing # --- Helper: Get System Info --- function Get-SystemInfo { try { - $os = Get-CimInstance Win32_OperatingSystem -ErrorAction Stops + $os = Get-CimInstance Win32_OperatingSystem -ErrorAction Stop $comp = Get-CimInstance Win32_ComputerSystem -ErrorAction Stop $edition = $os.Caption -replace "Microsoft ", "" @@ -62,16 +62,39 @@ function Get-SystemInfo { $sysInfo = Get-SystemInfo +# --- Theme Definitions --- +$DarkTheme = @{ + "AppBackground" = "#202020" + "NavBackground" = "#191919" + "CardBackground" = "#272727" + "CardBorder" = "#353535" + "CardHover" = "#323232" + "TextPrimary" = "#FFFFFF" + "TextSecondary" = "#A0A0A0" + "AccentColor" = "#60CDFF" +} + +$LightTheme = @{ + "AppBackground" = "#F3F3F3" + "NavBackground" = "#EBEBEB" + "CardBackground" = "#FFFFFF" + "CardBorder" = "#E0E0E0" + "CardHover" = "#F9F9F9" + "TextPrimary" = "#000000" + "TextSecondary" = "#666666" + "AccentColor" = "#0078D4" +} + # --- XAML --- [xml]$xaml = @" + Background="{DynamicResource AppBackground}" Foreground="{DynamicResource TextPrimary}" FontFamily="Segoe UI Variable Display, Segoe UI, sans-serif"> - + @@ -83,9 +106,9 @@ $sysInfo = Get-SystemInfo