fix(ui): consolidate mainwindow corner/clip fixes

This commit is contained in:
Meik
2026-03-05 17:25:56 +01:00
parent a7fc42b876
commit 97f87b9dcd
4 changed files with 213 additions and 36 deletions

View File

@@ -12,7 +12,7 @@
WindowStyle="None"
AllowsTransparency="False"
ResizeMode="NoResize"
Background="Transparent"
Background="{DynamicResource backgroundColor}"
Loaded="Window_Loaded"
Icon="Resources/icons/logo_CustomerPanel.ico"
KeyDown="App_KeyDown"
@@ -346,27 +346,28 @@
</Window.TaskbarItemInfo>
<shell:WindowChrome.WindowChrome>
<shell:WindowChrome CaptionHeight="72"
CornerRadius="18"
CornerRadius="20"
GlassFrameThickness="0"
ResizeBorderThickness="0"
UseAeroCaptionButtons="False" />
</shell:WindowChrome.WindowChrome>
<Grid x:Name="MainGrid"
Background="{DynamicResource backgroundColor}">
Background="Transparent">
<Border x:Name="MainWindowSurface"
CornerRadius="18"
BorderThickness="0"
CornerRadius="20"
BorderThickness="1"
BorderBrush="Transparent"
Background="{DynamicResource backgroundColor}"
SnapsToDevicePixels="True"
ClipToBounds="True">
<Grid>
<DockPanel Width="{Binding ActualWidth, ElementName=Window, Mode=OneWay}"
x:Name="MainDock"
<Grid x:Name="MainWindowContentRoot"
Margin="1">
<DockPanel x:Name="MainDock"
Background="{DynamicResource headerColor}">
<Grid DockPanel.Dock="Top"
x:Name="GridTop"
Width="{Binding ActualWidth, ElementName=Window, Mode=OneWay}"
HorizontalAlignment="Left"
HorizontalAlignment="Stretch"
Margin="0"
Background="{DynamicResource headerColor}"
Height="72"
@@ -485,32 +486,36 @@
BorderThickness="0"
BorderBrush="Gray"
CornerRadius="0,0,14,14"
Width="{Binding ActualWidth, ElementName=Window, Mode=OneWay}">
HorizontalAlignment="Stretch">
<Border.Background>
<ImageBrush ImageSource="Resources/top_cp.png"
Stretch="UniformToFill" />
</Border.Background>
</Border>
</Grid>
<StackPanel Orientation="Horizontal"
Width="75"
DockPanel.Dock="Top"
ClipToBounds="false"
x:Name="btnSP"
HorizontalAlignment="Left">
<Canvas ClipToBounds="false"
<Grid Width="500"
Height="576"
ClipToBounds="True"
x:Name="btnSP"
HorizontalAlignment="Left">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="75" />
<ColumnDefinition Width="425" />
</Grid.ColumnDefinitions>
<Canvas Grid.Column="0"
ClipToBounds="True"
Panel.ZIndex="1000"
Margin="0,0,0,0"
VerticalAlignment="Top"
HorizontalAlignment="Left"
Height="590"
Height="576"
Width="75">
<Border Canvas.Left="0"
Canvas.Top="8"
Width="75"
Height="580"
CornerRadius="20,0,0,0"
BorderThickness="1"
Height="568"
CornerRadius="20,0,0,20"
BorderThickness="0,1,1,1"
BorderBrush="{DynamicResource navigationRailBorderColor}"
Background="{DynamicResource navigationRailColor}" />
<Button Visibility="Hidden"
@@ -938,21 +943,24 @@
</Button>
</Canvas>
<Canvas Margin="0,0,0,0"
<Canvas Grid.Column="1"
Margin="0,0,0,0"
Panel.ZIndex="1"
ClipToBounds="False"
ClipToBounds="True"
Height="576"
Width="425"
>
<Border Canvas.Left="-75"
Canvas.Top="8"
Width="500"
Height="580"
Height="568"
CornerRadius="20"
BorderThickness="1"
BorderBrush="{DynamicResource panelBorderColor}"
Background="{DynamicResource panelBackgroundColor}" />
<Canvas x:Name="StPaMain"
Panel.ZIndex="1000"
Height="590"
Height="576"
Width="500"
Background="Transparent"
Canvas.Left="-75">
@@ -986,7 +994,7 @@
</Canvas>
</Canvas>
</StackPanel>
</Grid>
</DockPanel>
<Image Source="Resources/United-Kingdom-Flag-icon.png"
Panel.ZIndex="1001"
@@ -996,14 +1004,22 @@
Margin="80,0,0,140" />
</Grid>
</Border>
<Border x:Name="MainWindowOutline"
CornerRadius="18"
BorderThickness="1"
BorderBrush="{DynamicResource panelBorderColor}"
Background="Transparent"
IsHitTestVisible="False"
SnapsToDevicePixels="True"
Panel.ZIndex="3000" />
<Path x:Name="MainWindowCornerMaskOverlay"
Panel.ZIndex="3000"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Fill="{DynamicResource backgroundColor}"
IsHitTestVisible="False"
SnapsToDevicePixels="True" />
<Path x:Name="MainWindowFrameOverlay"
Panel.ZIndex="3001"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Fill="Transparent"
Stroke="{DynamicResource panelBorderColor}"
StrokeThickness="1"
IsHitTestVisible="False"
SnapsToDevicePixels="True" />
</Grid>
</Window>