Skip to content

armgit / Filee

Public Imported from GitHub
0

Free, open-source file converter. Convert 263 formats offline by drag & drop — images, PDF, Word, Excel, PowerPoint, HWP/HWPX, video, audio, e-books and archives. No upload, no Office needed.

Merge remote-tracking branch 'upstream/main' into feature/zip-gesture-and-fixes

gtxPrimeb5dacf14d02d
diff --cc src/Filee.App/Services/ThemeService.cs
index 219c3800,2ac2dd08..af3164d8
--- a/src/Filee.App/Services/ThemeService.cs
+++ b/src/Filee.App/Services/ThemeService.cs
@@@ -13,82 -12,12 +13,70 @@@ using Filee.Core.Settings
namespace Filee.App.Services;
/// <summary>Runtime theming.</summary>
-public sealed class ThemeService(IPlatformServices platform)
+public sealed class ThemeService
{
- /// <summary>Accent swatches offered in the Theme page.</summary>
+ private readonly IPlatformServices _platform;
+
+ private static readonly List<WeakReference<Window>> s_openWindows = [];
+
+ public ThemeService(IPlatformServices platform)
+ {
+ _platform = platform;
+ Window.WindowOpenedEvent.AddClassHandler<Window>((w, _) =>
+ {
+ lock (s_openWindows)
+ {
+ s_openWindows.RemoveAll(r => !r.TryGetTarget(out var target) || target == w);
+ s_openWindows.Add(new WeakReference<Window>(w));
+ }
+ if (IsMaterialYou)
+ w.Classes.Set("material-you", true);
+ });
+ Window.WindowClosedEvent.AddClassHandler<Window>((w, _) =>
+ {
+ lock (s_openWindows)
+ {
+ s_openWindows.RemoveAll(r => !r.TryGetTarget(out var target) || target == w);
+ }
+ });
+ }
+
+ /// <summary>Accent swatches offered in the Theme page for Soft theme.</summary>
public static readonly IReadOnlyList<string> Swatches =
- ["#7F77DD", "#1D9E75", "#D85A30", "#378ADD", "#D4537E", "#BA7517", "#639922", "#5F5E5A"];
+ ["#7F77DD", "#1D9E75", "#D85A30", "#378ADD", "#D4537E", "#BA7517", "#639922", "#5F5E5A", "#111111", "#FFFFFF"];
+
+ /// <summary>Curated Material 3 seed swatches for Material You theme.</summary>
+ public static readonly IReadOnlyList<string> MaterialYouSwatches =
+ ["#6750A4", "#0B57D0", "#006C4C", "#B3261E", "#825500", "#7F77DD", "#006A6A", "#4C616B", "#111111", "#FFFFFF"];
+
+ /// <summary>Inkora pastel preset definition with coordinated light and dark seeds.</summary>
+ public sealed record InkoraPastelPreset(string Key, string Name, string LightHex, string DarkHex);
+
+ /// <summary>Curated Inkora pastel and monochrome presets with name and light/dark color mappings.</summary>
+ public static readonly IReadOnlyList<InkoraPastelPreset> InkoraPresets =
+ [
+ new("monochrome", "Black & White", "#111111", "#FFFFFF"),
+ new("blushPeach", "Blush & Peach", "#E07A70", "#F29B91"),
+ new("strawberryMilk", "Strawberry Milk", "#E86483", "#F79BB0"),
+ new("matchaLatte", "Matcha Latte", "#5A8E51", "#8DC983"),
+ new("lavenderMist", "Lavender Mist", "#8B7AB8", "#BCAEE5"),
+ new("sageMint", "Sage & Mint", "#529B7D", "#88D5B1"),
+ new("honeyAmber", "Honey & Amber", "#CB852A", "#F0BA6A"),
+ new("cloudSky", "Cloud & Sky", "#5B8BE3", "#98B8F6"),
+ new("goldenParchment", "Golden Parchment", "#8A6B24", "#D4AF37"),
+ ];
+
+ /// <summary>Curated pastel palette add-on swatches from Inkora for both Material You and System/Soft themes.</summary>
+ public static readonly IReadOnlyList<string> PastelSwatches =
+ ["#E07A70", "#E86483", "#5A8E51", "#8B7AB8", "#529B7D", "#CB852A", "#5B8BE3", "#8A6B24",
+ "#F29B91", "#F79BB0", "#8DC983", "#BCAEE5", "#88D5B1", "#F0BA6A", "#98B8F6", "#D4AF37"];
+
+ /// <summary>Currently active theme style.</summary>
+ public ThemeStyle CurrentStyle { get; private set; } = ThemeStyle.Soft;
+
+ /// <summary>True when the Material You theme is currently applied.</summary>
+ public bool IsMaterialYou => CurrentStyle == ThemeStyle.MaterialYou;
- /// <summary>Embedded Noto fonts (see build/fetch-fonts.ps1). Missing files fall back to system fonts.</summary>
- private const string Latin = "fonts:Filee#Noto Sans";
- private const string Devanagari = "fonts:Filee#Noto Sans Devanagari";
-
- /// <summary>Each CJK region's embedded font and its system fonts (Windows, then macOS).</summary>
- private static readonly (string Embedded, string System) Japanese =
- ("fonts:Filee#Noto Sans JP", "Yu Gothic UI, Meiryo, Hiragino Sans");
- private static readonly (string Embedded, string System) Korean =
- ("fonts:Filee#Noto Sans KR", "Malgun Gothic, Apple SD Gothic Neo");
- private static readonly (string Embedded, string System) Chinese =
- ("fonts:Filee#Noto Sans SC", "Microsoft YaHei, PingFang SC");
-
/// <summary>
/// theme.json colour names → the brushes in Styles/Soft.axaml they replace. Must cover exactly
/// <see cref="CustomTheme.Keys"/> (a test checks).
@@@ -122,197 -47,22 +110,166 @@@
_ => ThemeVariant.Default,
};
- // Accent colour + derived shades, corner radii and the font order (shared with the installer).
- SoftPalette.ApplyAccent(res, Color.TryParse(theme.Accent, out var parsed) ? parsed : Color.Parse(SoftPalette.DefaultAccent));
- SoftPalette.ApplyCornerRadius(res, theme.CornerRadius);
+ // Accent colour + derived shades. Fluent controls read the System* keys.
- var accent = Color.TryParse(theme.Accent, out var parsed) ? parsed : Color.Parse(isM3 ? "#6750A4" : "#7F77DD");
++ var accent = Color.TryParse(theme.Accent, out var parsed) ? parsed : Color.Parse(isM3 ? "#6750A4" : SoftPalette.DefaultAccent);
+
+ var isDarkVariant = theme.Mode switch
+ {
+ ThemeMode.Dark => true,
+ ThemeMode.Light => false,
+ _ => app.ActualThemeVariant == ThemeVariant.Dark
+ };
+
+ if (isM3)
+ {
+ var lightM3 = MaterialYouPalette.Generate(accent, isDark: false);
+ var darkM3 = MaterialYouPalette.Generate(accent, isDark: true);
+ var activeM3 = isDarkVariant ? darkM3 : lightM3;
+
+ res["AccentColor"] = activeM3.Primary;
+ res["AccentBrush"] = new SolidColorBrush(activeM3.Primary);
+ res["AccentSoftBrush"] = new SolidColorBrush(activeM3.PrimaryContainer);
+ res["AccentFaintBrush"] = new SolidColorBrush(activeM3.SecondaryContainer);
+ res["AccentStrongBrush"] = new SolidColorBrush(activeM3.OnPrimaryContainer);
+ res["OnAccentBrush"] = new SolidColorBrush(activeM3.OnPrimary);
+
+ res["PrimaryContainerBrush"] = new SolidColorBrush(activeM3.PrimaryContainer);
+ res["OnPrimaryContainerBrush"] = new SolidColorBrush(activeM3.OnPrimaryContainer);
+ res["SecondaryContainerBrush"] = new SolidColorBrush(activeM3.SecondaryContainer);
+ res["OnSecondaryContainerBrush"] = new SolidColorBrush(activeM3.OnSecondaryContainer);
+
+ res["SystemAccentColor"] = activeM3.Primary;
- res["SystemAccentColorLight1"] = Shade(activeM3.Primary, 0.15);
- res["SystemAccentColorLight2"] = Shade(activeM3.Primary, 0.30);
- res["SystemAccentColorLight3"] = Shade(activeM3.Primary, 0.45);
- res["SystemAccentColorDark1"] = Shade(activeM3.Primary, -0.15);
- res["SystemAccentColorDark2"] = Shade(activeM3.Primary, -0.30);
- res["SystemAccentColorDark3"] = Shade(activeM3.Primary, -0.45);
++ res["SystemAccentColorLight1"] = SoftPalette.Shade(activeM3.Primary, 0.15);
++ res["SystemAccentColorLight2"] = SoftPalette.Shade(activeM3.Primary, 0.30);
++ res["SystemAccentColorLight3"] = SoftPalette.Shade(activeM3.Primary, 0.45);
++ res["SystemAccentColorDark1"] = SoftPalette.Shade(activeM3.Primary, -0.15);
++ res["SystemAccentColorDark2"] = SoftPalette.Shade(activeM3.Primary, -0.30);
++ res["SystemAccentColorDark3"] = SoftPalette.Shade(activeM3.Primary, -0.45);
+
+ // Fluent control brush keys harmonized with M3 roles
+ res["SliderTrackFill"] = new SolidColorBrush(activeM3.Primary);
+ res["SliderTrackValueFill"] = new SolidColorBrush(activeM3.Primary);
+ res["SliderThumbBackground"] = new SolidColorBrush(activeM3.Primary);
+ res["SliderThumbBorderBrush"] = new SolidColorBrush(activeM3.Primary);
+ res["SliderTrackBackground"] = new SolidColorBrush(activeM3.SurfaceContainerHighest);
+ res["ProgressBarTrackFill"] = new SolidColorBrush(activeM3.Primary);
+ res["ProgressBarBackground"] = new SolidColorBrush(activeM3.SurfaceContainerHighest);
+ res["ProgressBarProgress"] = new SolidColorBrush(activeM3.Primary);
+ res["ToggleSwitchFillOn"] = new SolidColorBrush(activeM3.Primary);
+ res["ToggleSwitchFillOff"] = new SolidColorBrush(activeM3.SurfaceContainerHighest);
+ res["ToggleSwitchKnobFillOn"] = new SolidColorBrush(activeM3.OnPrimary);
+ res["ToggleSwitchKnobFillOff"] = new SolidColorBrush(activeM3.Outline);
+ res["ToggleSwitchStrokeOff"] = new SolidColorBrush(activeM3.Outline);
+ res["CheckBoxCheckBackgroundFillChecked"] = new SolidColorBrush(activeM3.Primary);
+ res["CheckBoxCheckBackgroundStrokeChecked"] = new SolidColorBrush(activeM3.Primary);
+ res["CheckBoxCheckGlyphForegroundChecked"] = new SolidColorBrush(activeM3.OnPrimary);
+ res["AccentButtonBackground"] = new SolidColorBrush(activeM3.Primary);
+ res["AccentButtonForeground"] = new SolidColorBrush(activeM3.OnPrimary);
+ res["AccentButtonBackgroundPointerOver"] = new SolidColorBrush(activeM3.Secondary);
+ res["AccentButtonForegroundPointerOver"] = new SolidColorBrush(activeM3.OnSecondary);
+ res["AccentButtonBackgroundPressed"] = new SolidColorBrush(activeM3.PrimaryContainer);
+ res["AccentButtonForegroundPressed"] = new SolidColorBrush(activeM3.OnPrimaryContainer);
+
+ // "Softness": Material You expressive pill and rounded containers
+ var r = Math.Clamp(theme.CornerRadius, 0, 28);
+ res["SoftRadius"] = new CornerRadius(Math.Max(16, r));
+ res["SoftRadiusSmall"] = new CornerRadius(12);
+ res["SoftRadiusLarge"] = new CornerRadius(24);
+ res["PillRadius"] = new CornerRadius(999);
+ res["ControlCornerRadius"] = new CornerRadius(12);
+ res["OverlayCornerRadius"] = new CornerRadius(20);
+
+ ApplyMaterialYouTheme(res, ThemeVariant.Light, lightM3, custom?.Light);
+ ApplyMaterialYouTheme(res, ThemeVariant.Dark, darkM3, custom?.Dark);
+ }
+ else
+ {
- res["AccentColor"] = accent;
- res["AccentBrush"] = new SolidColorBrush(accent);
- res["AccentSoftBrush"] = new SolidColorBrush(accent, isDarkVariant ? 0.22 : 0.16);
- res["AccentFaintBrush"] = new SolidColorBrush(accent, isDarkVariant ? 0.12 : 0.08);
- res["AccentStrongBrush"] = new SolidColorBrush(isDarkVariant
- ? (MaterialYouPalette.Luminance(accent) > 0.45 ? accent : Shade(accent, 0.35))
- : (MaterialYouPalette.Luminance(accent) < 0.45 ? accent : Shade(accent, -0.35)));
- res["OnAccentBrush"] = new SolidColorBrush(MaterialYouPalette.TextOn(accent));
- res["SystemAccentColor"] = accent;
- res["SystemAccentColorLight1"] = Shade(accent, 0.15);
- res["SystemAccentColorLight2"] = Shade(accent, 0.30);
- res["SystemAccentColorLight3"] = Shade(accent, 0.45);
- res["SystemAccentColorDark1"] = Shade(accent, -0.15);
- res["SystemAccentColorDark2"] = Shade(accent, -0.30);
- res["SystemAccentColorDark3"] = Shade(accent, -0.45);
++ SoftPalette.ApplyAccent(res, accent);
++ SoftPalette.ApplyCornerRadius(res, theme.CornerRadius);
++ res["PillRadius"] = new CornerRadius(999);
+
+ res["DropZoneBackgroundBrush"] = isDarkVariant
+ ? new SolidColorBrush(Color.Parse("#252523"))
+ : new SolidColorBrush(Color.Parse("#F5F3ED"));
+ res["DropZoneBorderBrush"] = new SolidColorBrush(accent, 0.25);
+
+ res["AccentButtonBackground"] = res["AccentBrush"];
+ res["AccentButtonForeground"] = res["OnAccentBrush"];
+ res["AccentButtonBackgroundPointerOver"] = res["AccentStrongBrush"];
+ res["AccentButtonForegroundPointerOver"] = res["OnAccentBrush"];
+ res["AccentButtonBackgroundPressed"] = res["AccentFaintBrush"];
+ res["AccentButtonForegroundPressed"] = res["OnAccentBrush"];
+
+ // Clean up M3 Fluent overrides if present
+ res.Remove("SliderTrackFill");
+ res.Remove("SliderTrackValueFill");
+ res.Remove("SliderThumbBackground");
+ res.Remove("SliderThumbBorderBrush");
+ res.Remove("SliderTrackBackground");
+ res.Remove("ProgressBarTrackFill");
+ res.Remove("ProgressBarBackground");
+ res.Remove("ProgressBarProgress");
+ res.Remove("ToggleSwitchFillOn");
+ res.Remove("ToggleSwitchFillOff");
+ res.Remove("ToggleSwitchKnobFillOn");
+ res.Remove("ToggleSwitchKnobFillOff");
+ res.Remove("ToggleSwitchStrokeOff");
+ res.Remove("CheckBoxCheckBackgroundFillChecked");
+ res.Remove("CheckBoxCheckBackgroundStrokeChecked");
+ res.Remove("CheckBoxCheckGlyphForegroundChecked");
+
- var r = Math.Clamp(theme.CornerRadius, 0, 28);
- res["SoftRadius"] = new CornerRadius(r);
- res["SoftRadiusSmall"] = new CornerRadius(Math.Round(r * 0.55));
- res["SoftRadiusLarge"] = new CornerRadius(Math.Round(r * 1.35));
- res["PillRadius"] = new CornerRadius(999);
- res["ControlCornerRadius"] = new CornerRadius(Math.Round(r * 0.55));
- res["OverlayCornerRadius"] = new CornerRadius(r);
-
+ ApplyCustom(res, ThemeVariant.Light, custom?.Light);
+ ApplyCustom(res, ThemeVariant.Dark, custom?.Dark);
+ }
+
- res["AppFontFamily"] = FontFamily.Parse(FontFamilies(language));
+ res["AppFontFamily"] = SoftPalette.FontFamilyFor(language);
- // Application.Resources is searched before the styles, so these theme dictionaries win over Soft.axaml's.
- ApplyCustom(res, ThemeVariant.Light, custom?.Light);
- ApplyCustom(res, ThemeVariant.Dark, custom?.Dark);
+ // Update all active windows
+ lock (s_openWindows)
+ {
+ s_openWindows.RemoveAll(r => !r.TryGetTarget(out _));
+ foreach (var r in s_openWindows)
+ if (r.TryGetTarget(out var window))
+ window.Classes.Set("material-you", isM3);
+ }
+ if (app.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime desktop)
+ {
+ foreach (var window in desktop.Windows)
+ window.Classes.Set("material-you", isM3);
+ }
+
+ Motion.Configure(theme.ReduceMotion, () => _platform.PrefersReducedMotion);
+ }
+
+ /// <summary>Applies Material You generated colors to the theme dictionary for one variant.</summary>
+ private static void ApplyMaterialYouTheme(IResourceDictionary res, ThemeVariant variant, MaterialYouPalette m3, IReadOnlyDictionary<string, string>? custom)
+ {
+ var dict = new ResourceDictionary
+ {
+ ["PageBrush"] = new SolidColorBrush(m3.SurfaceContainerLowest),
+ ["SurfaceBrush"] = new SolidColorBrush(m3.Surface),
+ ["SurfaceAltBrush"] = new SolidColorBrush(m3.SurfaceContainerHigh),
+ ["SubtleBorderBrush"] = new SolidColorBrush(m3.OutlineVariant),
+ ["TextPrimaryBrush"] = new SolidColorBrush(m3.OnSurface),
+ ["TextSecondaryBrush"] = new SolidColorBrush(m3.OnSurfaceVariant),
+ ["DangerBrush"] = new SolidColorBrush(m3.Danger),
+ ["SuccessBrush"] = new SolidColorBrush(m3.Success),
+ ["WarningBrush"] = new SolidColorBrush(m3.Warning),
+ ["CardShadow"] = m3.CardShadow,
+ };
+
+ // Custom colours from theme.json take precedence if present
+ foreach (var (name, value) in custom ?? new Dictionary<string, string>())
+ if (CustomBrushKeys.TryGetValue(name, out var key) && Color.TryParse(value, out var color))
+ dict[key] = new SolidColorBrush(color);
- Motion.Configure(theme.ReduceMotion, () => platform.PrefersReducedMotion);
+ res.ThemeDictionaries[variant] = dict;
}
- /// <summary>Replaces (or, with no colours, removes) the user's colours for one variant.</summary>
- /// <summary>
- /// The UI font chain. Han characters look different in Japanese, Korean and Chinese fonts, so the UI language's
- /// CJK fonts come first, embedded and system ones alike; other languages keep Korean first.
- /// </summary>
- internal static string FontFamilies(string language)
- {
- (string Embedded, string System)[] cjk =
- language.StartsWith("ja", StringComparison.OrdinalIgnoreCase) ? [Japanese, Korean, Chinese]
- : language.StartsWith("zh", StringComparison.OrdinalIgnoreCase) ? [Chinese, Korean, Japanese]
- : [Korean, Chinese, Japanese];
- return $"{Latin}, {Devanagari}, {string.Join(", ", cjk.Select(f => f.Embedded))}, Segoe UI, Nirmala UI, "
- + $"{string.Join(", ", cjk.Select(f => f.System))}, Kohinoor Devanagari, sans-serif";
- }
+ /// <summary>The UI font chain for <paramref name="language"/> (see <see cref="SoftPalette.FontFamilies"/>).</summary>
+ internal static string FontFamilies(string language) => SoftPalette.FontFamilies(language);
+ /// <summary>Replaces (or, with no colours, removes) the user's colours for one variant.</summary>
private static void ApplyCustom(IResourceDictionary res, ThemeVariant variant, IReadOnlyDictionary<string, string>? colors)
{
var dictionary = new ResourceDictionary();
diff --cc src/Filee.App/Styles/Controls.axaml
index 00000000,2894ad81..df4e2f13
mode 000000,100644..100644
--- a/src/Filee.App/Styles/Controls.axaml
+++ b/src/Filee.App/Styles/Controls.axaml
@@@ -1,0 -1,19 +1,23 @@@
+ <!-- Styles for Filee's own controls, kept out of Soft.axaml, which the installer shares. -->
+ <Styles xmlns="https://github.com/avaloniaui"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:c="using:Filee.App.Controls">
+
+ <!-- ───────── Donut control colours ───────── -->
+ <Style Selector="c|DonutMenu">
+ <Setter Property="SliceBrush" Value="{DynamicResource SurfaceBrush}" />
+ <Setter Property="SliceBorderBrush" Value="{DynamicResource SubtleBorderBrush}" />
+ <Setter Property="CornerRadius" Value="{DynamicResource SoftRadius}" />
+ <Setter Property="CenterBrush" Value="{DynamicResource SurfaceBrush}" />
+ <Setter Property="AccentBrush" Value="{DynamicResource AccentBrush}" />
+ <Setter Property="OnAccentBrush" Value="{DynamicResource OnAccentBrush}" />
+ <Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}" />
+ <Setter Property="SecondaryForeground" Value="{DynamicResource TextSecondaryBrush}" />
+ <Setter Property="DangerBrush" Value="{DynamicResource DangerBrush}" />
+ <Setter Property="SuccessBrush" Value="{DynamicResource SuccessBrush}" />
+ </Style>
++
++ <Style Selector="Window.material-you c|DonutMenu, c|DonutMenu.material-you">
++ <Setter Property="IsMaterialYou" Value="True" />
++ </Style>
+ </Styles>
diff --cc src/Filee.App/Styles/Soft.axaml
index 6542f0aa,add41e68..0ccf5a48
--- a/src/Filee.App/Styles/Soft.axaml
+++ b/src/Filee.App/Styles/Soft.axaml
@@@ -303,697 -212,6 +304,678 @@@
<Setter Property="Background" Value="{DynamicResource AccentSoftBrush}" />
</Style>
- <!-- ───────── Donut control colours ───────── -->
- <Style Selector="c|DonutMenu">
- <Setter Property="SliceBrush" Value="{DynamicResource SurfaceBrush}" />
- <Setter Property="SliceBorderBrush" Value="{DynamicResource SubtleBorderBrush}" />
- <Setter Property="CornerRadius" Value="{DynamicResource SoftRadius}" />
- <Setter Property="CenterBrush" Value="{DynamicResource SurfaceBrush}" />
- <Setter Property="AccentBrush" Value="{DynamicResource AccentBrush}" />
- <Setter Property="OnAccentBrush" Value="{DynamicResource OnAccentBrush}" />
- <Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}" />
- <Setter Property="SecondaryForeground" Value="{DynamicResource TextSecondaryBrush}" />
- <Setter Property="DangerBrush" Value="{DynamicResource DangerBrush}" />
- <Setter Property="SuccessBrush" Value="{DynamicResource SuccessBrush}" />
- </Style>
-
+ <!-- ───────── Material You (M3) design system ───────── -->
+
+ <!-- Typography & Headings -->
+ <Style Selector="Window.material-you TextBlock.h1">
+ <Setter Property="FontSize" Value="26" />
+ <Setter Property="FontWeight" Value="SemiBold" />
+ <Setter Property="Margin" Value="0,0,0,4" />
+ </Style>
+ <Style Selector="Window.material-you TextBlock.h2">
+ <Setter Property="FontSize" Value="18" />
+ <Setter Property="FontWeight" Value="SemiBold" />
+ </Style>
+ <Style Selector="Window.material-you TextBlock.label">
+ <Setter Property="FontSize" Value="13" />
+ <Setter Property="FontWeight" Value="Medium" />
+ <Setter Property="Margin" Value="0,0,0,6" />
+ </Style>
+
+ <!-- Cards: M3 elevated tonal surface, 20px corners, non-clipping -->
+ <Style Selector="Window.material-you Border.card">
+ <Setter Property="CornerRadius" Value="20" />
+ <Setter Property="Padding" Value="20,16" />
+ <Setter Property="Background" Value="{DynamicResource SurfaceContainerBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource SubtleBorderBrush}" />
+ <Setter Property="BorderThickness" Value="1" />
+ <Setter Property="BoxShadow" Value="{DynamicResource CardShadow}" />
+ <Setter Property="ClipToBounds" Value="False" />
+ </Style>
+
+ <!-- Navigation items -->
+ <Style Selector="Window.material-you ListBox.nav ListBoxItem">
+ <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="Padding" Value="16,10" />
+ <Setter Property="Margin" Value="0,2" />
+ <Setter Property="Transitions">
+ <Transitions>
+ <TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.25" Easing="{StaticResource SoftEase}" />
+ <BrushTransition Property="Background" Duration="0:0:0.18" />
+ </Transitions>
+ </Setter>
+ </Style>
+ <Style Selector="Window.material-you ListBox.nav ListBoxItem:pointerover">
+ <Setter Property="RenderTransform" Value="scale(1.02)" />
+ </Style>
+ <Style Selector="Window.material-you ListBox.nav ListBoxItem:selected /template/ ContentPresenter#PART_ContentPresenter">
+ <Setter Property="Background" Value="{DynamicResource AccentSoftBrush}" />
+ <Setter Property="Foreground" Value="{DynamicResource AccentStrongBrush}" />
+ <Setter Property="FontWeight" Value="SemiBold" />
+ </Style>
+ <Style Selector="Window.material-you ListBox.nav ListBoxItem:selected:pointerover /template/ ContentPresenter#PART_ContentPresenter">
+ <Setter Property="Background" Value="{DynamicResource AccentSoftBrush}" />
+ </Style>
+
+ <!-- List tiles (Presets, Profiles, Suggestions) -->
+ <Style Selector="Window.material-you ListBox.soft ListBoxItem">
+ <Setter Property="CornerRadius" Value="14" />
+ <Setter Property="Padding" Value="14,10" />
+ <Setter Property="Margin" Value="2,2,6,2" />
+ <Setter Property="Transitions">
+ <Transitions>
+ <TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.22" Easing="{StaticResource SoftEase}" />
+ <BrushTransition Property="Background" Duration="0:0:0.18" />
+ </Transitions>
+ </Setter>
+ </Style>
+ <Style Selector="Window.material-you ListBox.soft ListBoxItem:pointerover">
+ <Setter Property="RenderTransform" Value="translateX(2px)" />
+ </Style>
+ <Style Selector="Window.material-you ListBox.soft ListBoxItem:selected /template/ ContentPresenter#PART_ContentPresenter">
+ <Setter Property="Background" Value="{DynamicResource AccentSoftBrush}" />
+ <Setter Property="Foreground" Value="{DynamicResource AccentStrongBrush}" />
+ <Setter Property="FontWeight" Value="SemiBold" />
+ </Style>
+ <Style Selector="Window.material-you ListBox.soft ListBoxItem:selected:pointerover /template/ ContentPresenter#PART_ContentPresenter">
+ <Setter Property="Background" Value="{DynamicResource AccentSoftBrush}" />
+ </Style>
+
+ <!-- DropZone tile: dark tonal surface with subtle border -->
+ <Style Selector="Window.material-you Border#DropZone">
+ <Setter Property="CornerRadius" Value="24" />
+ <Setter Property="Padding" Value="28,24" />
+ <Setter Property="Background" Value="{DynamicResource SurfaceContainerLowBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource SubtleBorderBrush}" />
+ <Setter Property="BoxShadow" Value="{DynamicResource CardShadow}" />
+ </Style>
+ <Style Selector="Window.material-you Border#DropZone.over">
+ <Setter Property="Background" Value="{DynamicResource AccentSoftBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}" />
+ <Setter Property="RenderTransform" Value="scale(1.02)" />
+ </Style>
+
+ <!-- Buttons: M3 full pill with spring press (excluding multi-line choice cards) -->
+ <Style Selector="Window.material-you Button:not(.choice-card), Window.material-you ToggleButton">
+ <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="Padding" Value="18,8" />
+ <Setter Property="FontWeight" Value="Medium" />
+ <Setter Property="Transitions">
+ <Transitions>
+ <TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.20" Easing="{StaticResource SoftEase}" />
+ <BrushTransition Property="Background" Duration="0:0:0.18" />
+ </Transitions>
+ </Setter>
+ </Style>
+ <Style Selector="Window.material-you Button:not(.choice-card):pointerover, Window.material-you ToggleButton:pointerover">
+ <Setter Property="RenderTransform" Value="scale(1.02)" />
+ </Style>
+ <Style Selector="Window.material-you Button:not(.choice-card):pressed, Window.material-you ToggleButton:pressed">
+ <Setter Property="RenderTransform" Value="scale(0.94)" />
+ </Style>
+
+ <!-- Multi-line Choice Cards in Material You -->
+ <Style Selector="Window.material-you Button.choice-card">
+ <Setter Property="CornerRadius" Value="16" />
+ <Setter Property="Padding" Value="16,14" />
+ <Setter Property="MinHeight" Value="115" />
+ <Setter Property="VerticalAlignment" Value="Stretch" />
+ <Setter Property="VerticalContentAlignment" Value="Stretch" />
+ <Setter Property="Background" Value="{DynamicResource CardBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource SubtleBorderBrush}" />
+ <Setter Property="BorderThickness" Value="1.5" />
+ <Setter Property="RenderTransform" Value="none" />
+ </Style>
+ <Style Selector="Window.material-you Button.choice-card:pointerover">
+ <Setter Property="Background" Value="{DynamicResource SurfaceAltBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource AccentSoftBrush}" />
+ <Setter Property="RenderTransform" Value="none" />
+ </Style>
+ <Style Selector="Window.material-you Button.choice-card.selected">
+ <Setter Property="Background" Value="{DynamicResource AccentSoftBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}" />
+ <Setter Property="BorderThickness" Value="1.5" />
+ <Setter Property="CornerRadius" Value="16" />
+ <Setter Property="RenderTransform" Value="none" />
+ </Style>
+ <Style Selector="Window.material-you Button.choice-card.selected:pointerover">
+ <Setter Property="Background" Value="{DynamicResource AccentSoftBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource AccentStrongBrush}" />
+ <Setter Property="RenderTransform" Value="none" />
+ </Style>
+
+ <!-- Standard action buttons in Material You (Clear history, Export, Import, Reset, etc.) -->
+ <Style Selector="Window.material-you Button:not(.accent):not(.ghost):not(.icon):not(.navlink):not(.swatch):not(.preset-pill):not(.tonal):not(.choice-card)">
+ <Setter Property="Background" Value="{DynamicResource SurfaceAltBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource SubtleBorderBrush}" />
+ <Setter Property="BorderThickness" Value="1" />
+ <Setter Property="Foreground" Value="{DynamicResource TextPrimaryBrush}" />
+ </Style>
+ <Style Selector="Window.material-you Button:not(.accent):not(.ghost):not(.icon):not(.navlink):not(.swatch):not(.preset-pill):not(.tonal):not(.choice-card):pointerover">
+ <Setter Property="Background" Value="{DynamicResource SurfaceContainerHighestBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}" />
+ <Setter Property="RenderTransform" Value="scale(1.02)" />
+ </Style>
+
+ <!-- Swatch buttons for theme selection -->
+ <Style Selector="Button.swatch">
+ <Setter Property="Width" Value="32" />
+ <Setter Property="Height" Value="32" />
+ <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="Padding" Value="0" />
+ <Setter Property="BorderThickness" Value="2" />
+ <Setter Property="BorderBrush" Value="Transparent" />
+ <Setter Property="RenderTransform" Value="none" />
+ <Setter Property="Transitions">
+ <Transitions>
+ <TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.18" Easing="{StaticResource SoftEase}" />
+ <BrushTransition Property="BorderBrush" Duration="0:0:0.18" />
+ </Transitions>
+ </Setter>
+ </Style>
+ <Style Selector="Button.swatch:pointerover">
+ <Setter Property="RenderTransform" Value="scale(1.22)" />
+ <Setter Property="BorderBrush" Value="{DynamicResource TextPrimaryBrush}" />
+ </Style>
+ <Style Selector="Button.swatch:pointerover /template/ ContentPresenter#PART_ContentPresenter">
+ <Setter Property="Background" Value="{TemplateBinding Background}" />
+ </Style>
+ <Style Selector="Button.swatch:pressed /template/ ContentPresenter#PART_ContentPresenter">
+ <Setter Property="Background" Value="{TemplateBinding Background}" />
+ <Setter Property="Opacity" Value="0.82" />
+ </Style>
+
+ <!-- Preset pill buttons in Theme Page -->
+ <Style Selector="Button.preset-pill">
+ <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="Padding" Value="10,6" />
+ <Setter Property="Background" Value="{DynamicResource SurfaceBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource SubtleBorderBrush}" />
+ <Setter Property="BorderThickness" Value="1" />
+ <Setter Property="Transitions">
+ <Transitions>
+ <TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.18" Easing="{StaticResource SoftEase}" />
+ <BrushTransition Property="Background" Duration="0:0:0.18" />
+ <BrushTransition Property="BorderBrush" Duration="0:0:0.18" />
+ </Transitions>
+ </Setter>
+ </Style>
+ <Style Selector="Button.preset-pill:pointerover">
+ <Setter Property="RenderTransform" Value="scale(1.03)" />
+ <Setter Property="Background" Value="{DynamicResource SurfaceAltBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}" />
+ </Style>
+ <Style Selector="Button.preset-pill:pressed">
+ <Setter Property="RenderTransform" Value="scale(0.96)" />
+ </Style>
+ <Style Selector="Button.preset-pill:pointerover /template/ ContentPresenter#PART_ContentPresenter">
+ <Setter Property="Background" Value="{DynamicResource SurfaceAltBrush}" />
+ </Style>
+
+ <!-- Filled Accent Button -->
+ <Style Selector="Button.accent, Window.material-you Button.accent">
+ <Setter Property="Background" Value="{DynamicResource AccentBrush}" />
+ <Setter Property="Foreground" Value="{DynamicResource OnAccentBrush}" />
+ <Setter Property="BorderThickness" Value="0" />
+ <Setter Property="FontWeight" Value="SemiBold" />
+ </Style>
+ <Style Selector="Button.accent /template/ ContentPresenter#PART_ContentPresenter, Window.material-you Button.accent /template/ ContentPresenter#PART_ContentPresenter">
+ <Setter Property="Background" Value="{DynamicResource AccentBrush}" />
+ <Setter Property="Foreground" Value="{DynamicResource OnAccentBrush}" />
+ <Setter Property="BorderThickness" Value="0" />
+ </Style>
+ <Style Selector="Button.accent:pointerover /template/ ContentPresenter#PART_ContentPresenter, Window.material-you Button.accent:pointerover /template/ ContentPresenter#PART_ContentPresenter">
+ <Setter Property="Background" Value="{DynamicResource AccentButtonBackgroundPointerOver}" />
+ <Setter Property="Foreground" Value="{DynamicResource OnAccentBrush}" />
+ <Setter Property="BorderThickness" Value="0" />
+ </Style>
+ <Style Selector="Button.accent:pressed /template/ ContentPresenter#PART_ContentPresenter, Window.material-you Button.accent:pressed /template/ ContentPresenter#PART_ContentPresenter">
+ <Setter Property="Background" Value="{DynamicResource AccentFaintBrush}" />
+ <Setter Property="Foreground" Value="{DynamicResource OnAccentBrush}" />
+ <Setter Property="BorderThickness" Value="0" />
+ </Style>
+ <Style Selector="Button.accent PathIcon, Window.material-you Button.accent PathIcon,
+ Button.accent:pointerover PathIcon, Window.material-you Button.accent:pointerover PathIcon,
+ Button.accent:pressed PathIcon, Window.material-you Button.accent:pressed PathIcon">
+ <Setter Property="Foreground" Value="{DynamicResource OnAccentBrush}" />
+ </Style>
+ <Style Selector="Button.accent TextBlock, Window.material-you Button.accent TextBlock,
+ Button.accent:pointerover TextBlock, Window.material-you Button.accent:pointerover TextBlock,
+ Button.accent:pressed TextBlock, Window.material-you Button.accent:pressed TextBlock">
+ <Setter Property="Foreground" Value="{DynamicResource OnAccentBrush}" />
+ <Setter Property="FontWeight" Value="SemiBold" />
+ </Style>
+ <Style Selector="Button.accent:pointerover, Window.material-you Button.accent:pointerover">
+ <Setter Property="RenderTransform" Value="scale(1.02)" />
+ </Style>
+
+ <!-- Filled Tonal Button -->
+ <Style Selector="Window.material-you Button.tonal">
+ <Setter Property="Background" Value="{DynamicResource AccentSoftBrush}" />
+ <Setter Property="Foreground" Value="{DynamicResource AccentStrongBrush}" />
+ <Setter Property="BorderThickness" Value="0" />
+ </Style>
+
+ <!-- Ghost / Text Button -->
+ <Style Selector="Window.material-you Button.ghost">
+ <Setter Property="Background" Value="Transparent" />
+ <Setter Property="BorderThickness" Value="0" />
+ <Setter Property="Foreground" Value="{DynamicResource AccentBrush}" />
+ </Style>
+ <Style Selector="Window.material-you Button.ghost:pointerover">
+ <Setter Property="Background" Value="{DynamicResource AccentFaintBrush}" />
+ </Style>
+
+ <!-- Navlink Button -->
+ <Style Selector="Window.material-you Button.navlink">
+ <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="Padding" Value="12,7" />
+ <Setter Property="Background" Value="{DynamicResource SurfaceAltBrush}" />
+ <Setter Property="BorderThickness" Value="0" />
+ </Style>
+ <Style Selector="Window.material-you Button.navlink:pointerover">
+ <Setter Property="Background" Value="{DynamicResource AccentFaintBrush}" />
+ </Style>
+
+ <!-- Icon Button -->
+ <Style Selector="Window.material-you Button.icon">
+ <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="Padding" Value="8" />
+ <Setter Property="Background" Value="Transparent" />
+ <Setter Property="BorderThickness" Value="0" />
+ </Style>
+ <Style Selector="Window.material-you Button.icon:pointerover">
+ <Setter Property="Background" Value="{DynamicResource AccentFaintBrush}" />
+ </Style>
+
+ <!-- Chips & Badges -->
+ <Style Selector="Window.material-you Border.chip">
+ <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="Padding" Value="14,6" />
+ <Setter Property="Margin" Value="3" />
+ <Setter Property="Background" Value="{DynamicResource SurfaceBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource SubtleBorderBrush}" />
+ <Setter Property="BorderThickness" Value="1" />
+ </Style>
+ <Style Selector="Window.material-you Border.chip:pointerover">
+ <Setter Property="Background" Value="{DynamicResource AccentSoftBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}" />
+ <Setter Property="RenderTransform" Value="scale(1.04)" />
+ </Style>
+
+ <Style Selector="Window.material-you Border.badge">
+ <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="Padding" Value="10,3" />
+ <Setter Property="Background" Value="{DynamicResource SurfaceAltBrush}" />
+ </Style>
+ <Style Selector="Window.material-you Border.badge TextBlock">
+ <Setter Property="FontWeight" Value="Medium" />
+ </Style>
+ <Style Selector="Window.material-you Border.badge.ok">
+ <Setter Property="Background" Value="{DynamicResource AccentSoftBrush}" />
+ </Style>
+
+ <Style Selector="Window.material-you Border.tagchip">
+ <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="Padding" Value="12,2,4,2" />
+ <Setter Property="Background" Value="{DynamicResource SurfaceAltBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource SubtleBorderBrush}" />
+ <Setter Property="BorderThickness" Value="1" />
+ </Style>
+ <Style Selector="Window.material-you Border.tagchip:focus">
+ <Setter Property="Background" Value="{DynamicResource AccentSoftBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}" />
+ </Style>
+
+ <Style Selector="Window.material-you ToggleButton.extchip">
+ <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="Padding" Value="14,5" />
+ <Setter Property="Margin" Value="3" />
+ <Setter Property="FontWeight" Value="Medium" />
+ </Style>
+ <Style Selector="Window.material-you ToggleButton.extchip:checked /template/ ContentPresenter#PART_ContentPresenter">
+ <Setter Property="Background" Value="{DynamicResource AccentBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}" />
+ <Setter Property="Foreground" Value="{DynamicResource OnAccentBrush}" />
+ </Style>
+
+ <!-- Loaders / ProgressBars -->
+ <Style Selector="Window.material-you ProgressBar, Window.material-you ProgressBar.soft">
+ <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="Height" Value="8" />
+ <Setter Property="MinHeight" Value="8" />
+ <Setter Property="Foreground" Value="{DynamicResource AccentBrush}" />
+ <Setter Property="Background" Value="{DynamicResource AccentFaintBrush}" />
+ <Setter Property="BorderThickness" Value="0" />
+ </Style>
+
+ <!-- Seekbars / Sliders: Authentic Material 3 rounded pill track & M3 capsule thumb -->
+ <Style Selector="Window.material-you Slider:horizontal">
+ <Setter Property="MinHeight" Value="42" />
+ <Setter Property="Height" Value="42" />
+ <Setter Property="Foreground" Value="{DynamicResource AccentBrush}" />
+ <Setter Property="VerticalAlignment" Value="Center" />
+ </Style>
+ <Style Selector="Window.material-you Slider:horizontal /template/ Border#TrackBackground">
+ <Setter Property="Height" Value="16" />
+ <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="Background" Value="{DynamicResource SurfaceContainerHighestBrush}" />
+ </Style>
+ <Style Selector="Window.material-you Slider:horizontal /template/ RepeatButton#PART_DecreaseButton">
+ <Setter Property="Background" Value="{DynamicResource AccentBrush}" />
+ <Setter Property="Height" Value="16" />
+ <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="VerticalAlignment" Value="Center" />
+ </Style>
+ <Style Selector="Window.material-you Slider:horizontal /template/ RepeatButton#PART_DecreaseButton /template/ Border">
+ <Setter Property="Background" Value="{DynamicResource AccentBrush}" />
+ <Setter Property="Height" Value="16" />
+ <Setter Property="CornerRadius" Value="999" />
+ </Style>
+ <Style Selector="Window.material-you Slider:horizontal /template/ RepeatButton#PART_IncreaseButton">
+ <Setter Property="Background" Value="{DynamicResource SurfaceContainerHighestBrush}" />
+ <Setter Property="Height" Value="16" />
+ <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="VerticalAlignment" Value="Center" />
+ </Style>
+ <Style Selector="Window.material-you Slider:horizontal /template/ RepeatButton#PART_IncreaseButton /template/ Border">
+ <Setter Property="Background" Value="{DynamicResource SurfaceContainerHighestBrush}" />
+ <Setter Property="Height" Value="16" />
+ <Setter Property="CornerRadius" Value="999" />
+ </Style>
+ <Style Selector="Window.material-you Slider:horizontal /template/ Thumb#PART_Thumb">
+ <Setter Property="Width" Value="8" />
+ <Setter Property="Height" Value="28" />
+ <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="Background" Value="{DynamicResource AccentBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource SurfaceBrush}" />
+ <Setter Property="BorderThickness" Value="1.5" />
+ <Setter Property="VerticalAlignment" Value="Center" />
+ <Setter Property="Transitions">
+ <Transitions>
+ <TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.18" Easing="{StaticResource SoftEase}" />
+ </Transitions>
+ </Setter>
+ </Style>
+ <Style Selector="Window.material-you Slider:horizontal /template/ Thumb#PART_Thumb:pointerover">
+ <Setter Property="RenderTransform" Value="scale(1.25, 1.08)" />
+ </Style>
+ <Style Selector="Window.material-you Slider:horizontal /template/ Thumb#PART_Thumb:pressed">
+ <Setter Property="RenderTransform" Value="scale(1.4, 1.15)" />
+ </Style>
+
+ <!-- ToggleButtons (Filter chips / Modifiers) -->
+ <Style Selector="Window.material-you ToggleButton">
+ <Setter Property="CornerRadius" Value="999" />
+ <Setter Property="Padding" Value="16,6" />
+ <Setter Property="FontWeight" Value="Medium" />
+ <Setter Property="Background" Value="{DynamicResource SurfaceAltBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource SubtleBorderBrush}" />
+ <Setter Property="BorderThickness" Value="1" />
+ </Style>
+ <Style Selector="Window.material-you ToggleButton:checked /template/ ContentPresenter#PART_ContentPresenter">
+ <Setter Property="Background" Value="{DynamicResource AccentSoftBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}" />
+ <Setter Property="Foreground" Value="{DynamicResource AccentStrongBrush}" />
+ <Setter Property="FontWeight" Value="SemiBold" />
+ </Style>
+ <Style Selector="Window.material-you ToggleButton:checked">
+ <Setter Property="Background" Value="{DynamicResource AccentSoftBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}" />
+ <Setter Property="Foreground" Value="{DynamicResource AccentStrongBrush}" />
+ <Setter Property="FontWeight" Value="SemiBold" />
+ </Style>
+
+ <!-- Dropdowns (ComboBox): Material 3 container & popups -->
+ <Style Selector="Window.material-you ComboBox">
+ <Setter Property="MinHeight" Value="38" />
+ <Setter Property="CornerRadius" Value="14" />
+ <Setter Property="Background" Value="{DynamicResource SurfaceAltBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource SubtleBorderBrush}" />
+ <Setter Property="BorderThickness" Value="1" />
+ <Setter Property="Padding" Value="14,7" />
+ </Style>
+ <Style Selector="Window.material-you ComboBox:pointerover">
+ <Setter Property="Background" Value="{DynamicResource SurfaceContainerHighestBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}" />
+ </Style>
+ <Style Selector="Window.material-you ComboBox /template/ Border#PopupBorder">
+ <Setter Property="CornerRadius" Value="16" />
+ <Setter Property="Background" Value="{DynamicResource SurfaceContainerHighBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource SubtleBorderBrush}" />
+ <Setter Property="BorderThickness" Value="1" />
+ <Setter Property="Padding" Value="6" />
+ <Setter Property="BoxShadow" Value="{DynamicResource CardShadow}" />
+ </Style>
+ <!-- Dropdown opening: smooth, flicker-free opacity fade without layout margin shifts that cause popup window resize/flicker -->
+ <Style Selector="Window.material-you ComboBox[IsDropDownOpen=True] /template/ Border#PopupBorder, ComboBox[IsDropDownOpen=True] /template/ Border#PopupBorder">
+ <Style.Animations>
+ <Animation Duration="0:0:0.16" Easing="CubicEaseOut" FillMode="Forward">
+ <KeyFrame Cue="0%">
+ <Setter Property="Opacity" Value="0" />
+ </KeyFrame>
+ <KeyFrame Cue="100%">
+ <Setter Property="Opacity" Value="1" />
+ </KeyFrame>
+ </Animation>
+ </Style.Animations>
+ </Style>
+ <Style Selector="Window.material-you ComboBoxItem">
+ <Setter Property="CornerRadius" Value="10" />
+ <Setter Property="Padding" Value="12,8" />
+ <Setter Property="Margin" Value="0,1" />
+ </Style>
+ <Style Selector="Window.material-you ComboBoxItem:selected /template/ ContentPresenter#PART_ContentPresenter">
+ <Setter Property="Background" Value="{DynamicResource AccentSoftBrush}" />
+ <Setter Property="Foreground" Value="{DynamicResource AccentStrongBrush}" />
+ <Setter Property="FontWeight" Value="SemiBold" />
+ </Style>
+
+ <!-- ToggleSwitch: M3 track, knob and hover color -->
+ <Style Selector="Window.material-you ToggleSwitch">
+ <Setter Property="Transitions">
+ <Transitions>
+ <TransformOperationsTransition Property="RenderTransform" Duration="0:0:0.18" Easing="{StaticResource SoftEase}" />
+ </Transitions>
+ </Setter>
+ </Style>
+ <Style Selector="Window.material-you ToggleSwitch:pointerover">
+ <Setter Property="RenderTransform" Value="scale(1.02)" />
+ </Style>
+ <Style Selector="Window.material-you ToggleSwitch /template/ Border#SwitchKnobBounds">
+ <Setter Property="Transitions">
+ <Transitions>
+ <BrushTransition Property="Background" Duration="0:0:0.18" />
+ <BrushTransition Property="BorderBrush" Duration="0:0:0.18" />
+ </Transitions>
+ </Setter>
+ </Style>
+ <Style Selector="Window.material-you ToggleSwitch:pointerover /template/ Border#SwitchKnobBounds">
+ <Setter Property="Background" Value="{DynamicResource SurfaceContainerHighestBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}" />
+ </Style>
+ <Style Selector="Window.material-you ToggleSwitch:checked /template/ Border#SwitchKnobBounds">
+ <Setter Property="Background" Value="{DynamicResource AccentBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}" />
+ </Style>
+ <Style Selector="Window.material-you ToggleSwitch:checked:pointerover /template/ Border#SwitchKnobBounds">
+ <Setter Property="Background" Value="{DynamicResource AccentStrongBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource AccentStrongBrush}" />
+ </Style>
+ <Style Selector="Window.material-you ToggleSwitch:checked /template/ Ellipse#SwitchKnob">
+ <Setter Property="Fill" Value="{DynamicResource OnAccentBrush}" />
+ </Style>
+
+ <!-- Text inputs & NumericUpDown -->
+ <Style Selector="Window.material-you TextBox">
+ <Setter Property="MinHeight" Value="38" />
+ <Setter Property="CornerRadius" Value="14" />
+ <Setter Property="Background" Value="{DynamicResource SurfaceAltBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource SubtleBorderBrush}" />
+ <Setter Property="BorderThickness" Value="1" />
+ <Setter Property="Padding" Value="14,7" />
+ </Style>
+ <!-- Seamless NumericUpDown & ButtonSpinner (no inner boxes, seamless background, sleek chevrons) -->
+ <Style Selector="NumericUpDown">
+ <Style.Resources>
+ <SolidColorBrush x:Key="TextControlBackground" Color="Transparent" />
+ <SolidColorBrush x:Key="TextControlBackgroundPointerOver" Color="Transparent" />
+ <SolidColorBrush x:Key="TextControlBackgroundFocused" Color="Transparent" />
+ <SolidColorBrush x:Key="TextControlBorderBrush" Color="Transparent" />
+ <SolidColorBrush x:Key="TextControlBorderBrushPointerOver" Color="Transparent" />
+ <SolidColorBrush x:Key="TextControlBorderBrushFocused" Color="Transparent" />
+ <Thickness x:Key="TextControlBorderThemeThickness">0</Thickness>
+ <Thickness x:Key="TextControlBorderThemeThicknessFocused">0</Thickness>
+ <CornerRadius x:Key="ControlCornerRadius">0</CornerRadius>
+ </Style.Resources>
+ <Setter Property="CornerRadius" Value="12" />
+ <Setter Property="ClipToBounds" Value="True" />
+ <Setter Property="Background" Value="{DynamicResource SurfaceAltBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource SubtleBorderBrush}" />
+ <Setter Property="BorderThickness" Value="1" />
+ <Setter Property="Padding" Value="0" />
+ <Setter Property="MinHeight" Value="38" />
+ </Style>
+ <Style Selector="NumericUpDown:pointerover">
+ <Setter Property="Background" Value="{DynamicResource SurfaceContainerHighestBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}" />
+ </Style>
+
+ <!-- Inner TextBox inside NumericUpDown: completely transparent, seamless, NO inner borders or pill -->
+ <Style Selector="NumericUpDown /template/ TextBox#PART_TextBox, Window.material-you NumericUpDown /template/ TextBox#PART_TextBox, NumericUpDown /template/ TextBox, ButtonSpinner TextBox">
+ <Setter Property="Background" Value="Transparent" />
+ <Setter Property="BorderThickness" Value="0" />
+ <Setter Property="BorderBrush" Value="Transparent" />
+ <Setter Property="CornerRadius" Value="0" />
+ <Setter Property="Padding" Value="14,0,4,0" />
+ <Setter Property="MinHeight" Value="0" />
+ <Setter Property="VerticalAlignment" Value="Stretch" />
+ <Setter Property="VerticalContentAlignment" Value="Center" />
+ </Style>
+ <Style Selector="NumericUpDown /template/ TextBox#PART_TextBox:pointerover, Window.material-you NumericUpDown /template/ TextBox#PART_TextBox:pointerover">
+ <Setter Property="Background" Value="Transparent" />
+ <Setter Property="BorderBrush" Value="Transparent" />
+ </Style>
+ <Style Selector="NumericUpDown /template/ TextBox#PART_TextBox:focus, Window.material-you NumericUpDown /template/ TextBox#PART_TextBox:focus">
+ <Setter Property="Background" Value="Transparent" />
+ <Setter Property="BorderBrush" Value="Transparent" />
+ </Style>
+
+ <Style Selector="NumericUpDown:pointerover /template/ TextBox#PART_TextBox, Window.material-you NumericUpDown:pointerover /template/ TextBox#PART_TextBox, NumericUpDown /template/ TextBox#PART_TextBox:pointerover, Window.material-you NumericUpDown /template/ TextBox#PART_TextBox:pointerover">
+ <Setter Property="Background" Value="Transparent" />
+ <Setter Property="BorderBrush" Value="Transparent" />
+ <Setter Property="BorderThickness" Value="0" />
+ <Setter Property="CornerRadius" Value="0" />
+ </Style>
+
+ <!-- ButtonSpinner root & repeat buttons: remove vertical divider lines and floating circles in all states -->
+ <Style Selector="ButtonSpinner">
+ <Setter Property="Background" Value="Transparent" />
+ <Setter Property="BorderThickness" Value="0" />
+ <Setter Property="BorderBrush" Value="Transparent" />
+ <Setter Property="CornerRadius" Value="0" />
+ <Setter Property="Padding" Value="0,0,6,0" />
+ </Style>
+ <Style Selector="ButtonSpinner /template/ Border#PART_RootBorder">
+ <Setter Property="Background" Value="Transparent" />
+ <Setter Property="BorderThickness" Value="0" />
+ <Setter Property="BorderBrush" Value="Transparent" />
+ </Style>
+ <Style Selector="ButtonSpinner /template/ RepeatButton,
+ ButtonSpinner:right /template/ RepeatButton,
+ ButtonSpinner:right /template/ RepeatButton#PART_IncreaseButton,
+ ButtonSpinner:right /template/ RepeatButton#PART_DecreaseButton,
+ ButtonSpinner /template/ RepeatButton#PART_IncreaseButton,
+ ButtonSpinner /template/ RepeatButton#PART_DecreaseButton,
+ Window.material-you ButtonSpinner /template/ RepeatButton">
+ <Setter Property="Background" Value="Transparent" />
+ <Setter Property="BorderThickness" Value="0" />
+ <Setter Property="BorderBrush" Value="Transparent" />
+ <Setter Property="CornerRadius" Value="8" />
+ <Setter Property="Width" Value="24" />
+ <Setter Property="Height" Value="24" />
+ <Setter Property="MinWidth" Value="24" />
+ <Setter Property="MinHeight" Value="24" />
+ <Setter Property="Margin" Value="1,0" />
+ <Setter Property="Padding" Value="0" />
+ <Setter Property="VerticalAlignment" Value="Center" />
+ <Setter Property="HorizontalContentAlignment" Value="Center" />
+ <Setter Property="VerticalContentAlignment" Value="Center" />
+ <Setter Property="RenderTransform" Value="none" />
+ <Setter Property="Transitions" Value="{x:Null}" />
+ <Setter Property="Foreground" Value="{DynamicResource TextSecondaryBrush}" />
+ </Style>
+ <Style Selector="ButtonSpinner /template/ RepeatButton /template/ ContentPresenter#PART_ContentPresenter,
+ ButtonSpinner:right /template/ RepeatButton /template/ ContentPresenter#PART_ContentPresenter,
+ ButtonSpinner:right /template/ RepeatButton#PART_IncreaseButton /template/ ContentPresenter#PART_ContentPresenter,
+ ButtonSpinner:right /template/ RepeatButton#PART_DecreaseButton /template/ ContentPresenter#PART_ContentPresenter,
+ ButtonSpinner /template/ RepeatButton#PART_IncreaseButton /template/ ContentPresenter#PART_ContentPresenter,
+ ButtonSpinner /template/ RepeatButton#PART_DecreaseButton /template/ ContentPresenter#PART_ContentPresenter,
+ Window.material-you ButtonSpinner /template/ RepeatButton /template/ ContentPresenter#PART_ContentPresenter">
+ <Setter Property="Background" Value="Transparent" />
+ <Setter Property="BorderThickness" Value="0" />
+ <Setter Property="BorderBrush" Value="Transparent" />
+ <Setter Property="CornerRadius" Value="8" />
+ </Style>
+ <Style Selector="ButtonSpinner /template/ RepeatButton:pointerover /template/ ContentPresenter#PART_ContentPresenter,
+ ButtonSpinner:right /template/ RepeatButton:pointerover /template/ ContentPresenter#PART_ContentPresenter,
+ ButtonSpinner:right /template/ RepeatButton#PART_IncreaseButton:pointerover /template/ ContentPresenter#PART_ContentPresenter,
+ ButtonSpinner:right /template/ RepeatButton#PART_DecreaseButton:pointerover /template/ ContentPresenter#PART_ContentPresenter,
+ ButtonSpinner /template/ RepeatButton#PART_IncreaseButton:pointerover /template/ ContentPresenter#PART_ContentPresenter,
+ ButtonSpinner /template/ RepeatButton#PART_DecreaseButton:pointerover /template/ ContentPresenter#PART_ContentPresenter,
+ Window.material-you ButtonSpinner /template/ RepeatButton:pointerover /template/ ContentPresenter#PART_ContentPresenter">
+ <Setter Property="Background" Value="{DynamicResource AccentSoftBrush}" />
+ <Setter Property="BorderThickness" Value="0" />
+ <Setter Property="BorderBrush" Value="Transparent" />
+ </Style>
+ <Style Selector="ButtonSpinner /template/ RepeatButton:pointerover,
+ ButtonSpinner:right /template/ RepeatButton:pointerover,
+ ButtonSpinner:right /template/ RepeatButton#PART_IncreaseButton:pointerover,
+ ButtonSpinner:right /template/ RepeatButton#PART_DecreaseButton:pointerover,
+ ButtonSpinner /template/ RepeatButton#PART_IncreaseButton:pointerover,
+ ButtonSpinner /template/ RepeatButton#PART_DecreaseButton:pointerover,
+ Window.material-you ButtonSpinner /template/ RepeatButton:pointerover">
+ <Setter Property="BorderThickness" Value="0" />
+ <Setter Property="BorderBrush" Value="Transparent" />
+ <Setter Property="Foreground" Value="{DynamicResource AccentStrongBrush}" />
+ </Style>
+ <Style Selector="ButtonSpinner /template/ RepeatButton:pressed /template/ ContentPresenter#PART_ContentPresenter,
+ ButtonSpinner:right /template/ RepeatButton:pressed /template/ ContentPresenter#PART_ContentPresenter,
+ ButtonSpinner:right /template/ RepeatButton#PART_IncreaseButton:pressed /template/ ContentPresenter#PART_ContentPresenter,
+ ButtonSpinner:right /template/ RepeatButton#PART_DecreaseButton:pressed /template/ ContentPresenter#PART_ContentPresenter,
+ ButtonSpinner /template/ RepeatButton#PART_IncreaseButton:pressed /template/ ContentPresenter#PART_ContentPresenter,
+ ButtonSpinner /template/ RepeatButton#PART_DecreaseButton:pressed /template/ ContentPresenter#PART_ContentPresenter,
+ Window.material-you ButtonSpinner /template/ RepeatButton:pressed /template/ ContentPresenter#PART_ContentPresenter">
+ <Setter Property="Background" Value="{DynamicResource SurfaceContainerHighestBrush}" />
+ <Setter Property="BorderThickness" Value="0" />
+ <Setter Property="BorderBrush" Value="Transparent" />
+ </Style>
+ <Style Selector="Window.material-you NumericUpDown">
+ <Style.Resources>
+ <SolidColorBrush x:Key="TextControlBackground" Color="Transparent" />
+ <SolidColorBrush x:Key="TextControlBackgroundPointerOver" Color="Transparent" />
+ <SolidColorBrush x:Key="TextControlBackgroundFocused" Color="Transparent" />
+ <SolidColorBrush x:Key="TextControlBorderBrush" Color="Transparent" />
+ <SolidColorBrush x:Key="TextControlBorderBrushPointerOver" Color="Transparent" />
+ <SolidColorBrush x:Key="TextControlBorderBrushFocused" Color="Transparent" />
+ <Thickness x:Key="TextControlBorderThemeThickness">0</Thickness>
+ <Thickness x:Key="TextControlBorderThemeThicknessFocused">0</Thickness>
+ <CornerRadius x:Key="ControlCornerRadius">0</CornerRadius>
+ </Style.Resources>
+ <Setter Property="MinHeight" Value="38" />
+ <Setter Property="CornerRadius" Value="14" />
+ <Setter Property="ClipToBounds" Value="True" />
+ <Setter Property="Background" Value="{DynamicResource SurfaceAltBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource SubtleBorderBrush}" />
+ <Setter Property="BorderThickness" Value="1" />
+ <Setter Property="Padding" Value="0" />
+ <Setter Property="MinWidth" Value="160" />
+ </Style>
+ <Style Selector="Window.material-you NumericUpDown:pointerover">
+ <Setter Property="Background" Value="{DynamicResource SurfaceContainerHighestBrush}" />
+ <Setter Property="BorderBrush" Value="{DynamicResource AccentBrush}" />
+ </Style>
+
- <!-- Donut Menu Control -->
- <Style Selector="Window.material-you c|DonutMenu, c|DonutMenu.material-you">
- <Setter Property="IsMaterialYou" Value="True" />
- </Style>
-
<!-- ───────── Page content fade-in (keyframes can't animate RenderTransform, so Margin slides) ───────── -->
<Style Selector="ContentControl.page > :is(Control)">
<Style.Animations>