From d6d03133b492d4f593b80cfc77d8320c2aca8296 Mon Sep 17 00:00:00 2001 From: Zhang Dian <54255897+zdpcdt@users.noreply.github.com> Date: Sun, 15 Mar 2026 03:39:24 +0800 Subject: [PATCH] feat: refactor WindowDrawnDecorations with new styling and structure. (#768) --- .../Controls/WindowDrawnDecorations.axaml | 171 +++++++++--------- ...ons.axaml => WindowDrawnDecorations.axaml} | 3 + src/Semi.Avalonia/Themes/Dark/_index.axaml | 2 +- ...ons.axaml => WindowDrawnDecorations.axaml} | 2 + .../Themes/HighContrast/_index.axaml | 2 +- ...ons.axaml => WindowDrawnDecorations.axaml} | 3 + src/Semi.Avalonia/Themes/Light/_index.axaml | 2 +- ...ons.axaml => WindowDrawnDecorations.axaml} | 0 src/Semi.Avalonia/Themes/Shared/_index.axaml | 2 +- 9 files changed, 96 insertions(+), 91 deletions(-) rename src/Semi.Avalonia/Themes/Dark/{CaptionButtons.axaml => WindowDrawnDecorations.axaml} (80%) rename src/Semi.Avalonia/Themes/HighContrast/{CaptionButtons.axaml => WindowDrawnDecorations.axaml} (89%) rename src/Semi.Avalonia/Themes/Light/{CaptionButtons.axaml => WindowDrawnDecorations.axaml} (80%) rename src/Semi.Avalonia/Themes/Shared/{CaptionButtons.axaml => WindowDrawnDecorations.axaml} (100%) diff --git a/src/Semi.Avalonia/Controls/WindowDrawnDecorations.axaml b/src/Semi.Avalonia/Controls/WindowDrawnDecorations.axaml index 8b0ed6f..820fec8 100644 --- a/src/Semi.Avalonia/Controls/WindowDrawnDecorations.axaml +++ b/src/Semi.Avalonia/Controls/WindowDrawnDecorations.axaml @@ -8,7 +8,7 @@ - + + Foreground="{TemplateBinding Foreground}"> + + + + + + @@ -36,7 +44,7 @@ - + @@ -44,16 +52,17 @@ + BoxShadow="{DynamicResource WindowBorderShadow}" /> - @@ -61,10 +70,10 @@ - + - - + Content="{StaticResource WindowExpandGlyph}" + WindowDecorationProperties.ElementRole="FullScreenButton" /> + Content="{StaticResource WindowMinimizeGlyph}" + WindowDecorationProperties.ElementRole="MinimizeButton" /> + Content="{StaticResource WindowMaximizeGlyph}" + WindowDecorationProperties.ElementRole="MaximizeButton" /> + Content="{StaticResource WindowCloseIconGlyph}" + WindowDecorationProperties.ElementRole="CloseButton" /> - + + Content="{StaticResource WindowCollapseGlyph}" + WindowDecorationProperties.ElementRole="FullScreenButton" /> +