fix(ui): unify rounded frame rendering and inner content clip
This commit is contained in:
@@ -5,10 +5,9 @@
|
||||
- Komplettes visuelles Redesign der Hauptoberfläche mit modernerem Layout und konsistenter Typografie.
|
||||
- Navigation, Content und Header farblich auf dynamische Konfigurationsfarben umgestellt.
|
||||
- Einheitliche Button-Optik für Primary-Actions, Top-Bar-Actions und dialogbezogene Aktionen.
|
||||
- Außenrahmen der Haupt-GUI als durchgehender Outline-Rahmen umgesetzt, damit die Kontur auch über die Rundungen konsistent sichtbar bleibt.
|
||||
- Eckradius von WindowChrome und Außenrahmen auf das Inhalts-Panel abgestimmt, damit die Rundungen einheitlich wirken.
|
||||
- Hauptfläche mit explizitem Rounded-Clip (inset-korrigiert) versehen, damit Inhalte an allen vier Ecken innerhalb des Außenrahmens bleiben.
|
||||
- Initialisierung des Rounded-Clips auf den finalen Layout-Zeitpunkt erweitert (Loaded/Render), damit die Rundungsbegrenzung stabil auf allen Ecken greift.
|
||||
- Außenrahmen der Haupt-GUI als durchgehende Border auf der Hauptfläche umgesetzt, damit die Kontur über alle Rundungen konsistent bleibt.
|
||||
- Eckradius von WindowChrome, Hauptfläche und Inhalts-Clip aufeinander abgestimmt, damit Inhalte in allen vier Ecken innerhalb des Rahmens bleiben.
|
||||
- Initialisierung des Rounded-Clips auf den finalen Layout-Zeitpunkt erweitert (Loaded/Render), damit die Rundungsbegrenzung stabil greift.
|
||||
|
||||
### Navigation und Interaktion
|
||||
- Navigation-Buttons neu ausgerichtet (horizontal/vertikal), Icons vergrößert und Zustände vereinheitlicht.
|
||||
|
||||
@@ -355,13 +355,13 @@
|
||||
<Grid x:Name="MainGrid"
|
||||
Background="Transparent">
|
||||
<Border x:Name="MainWindowSurface"
|
||||
CornerRadius="19"
|
||||
Margin="1"
|
||||
BorderThickness="0"
|
||||
CornerRadius="20"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{DynamicResource panelBorderColor}"
|
||||
Background="{DynamicResource backgroundColor}"
|
||||
SnapsToDevicePixels="True"
|
||||
ClipToBounds="True">
|
||||
<Grid>
|
||||
<Grid x:Name="MainWindowContentRoot">
|
||||
<DockPanel Width="{Binding ActualWidth, ElementName=Window, Mode=OneWay}"
|
||||
x:Name="MainDock"
|
||||
Background="{DynamicResource headerColor}">
|
||||
@@ -998,14 +998,6 @@
|
||||
Margin="80,0,0,140" />
|
||||
</Grid>
|
||||
</Border>
|
||||
<Border x:Name="MainWindowOutline"
|
||||
CornerRadius="20"
|
||||
BorderThickness="1"
|
||||
BorderBrush="{DynamicResource panelBorderColor}"
|
||||
Background="Transparent"
|
||||
IsHitTestVisible="False"
|
||||
SnapsToDevicePixels="True"
|
||||
Panel.ZIndex="3000" />
|
||||
</Grid>
|
||||
</Window>
|
||||
|
||||
|
||||
@@ -2172,26 +2172,19 @@ namespace C4IT_CustomerPanel
|
||||
|
||||
private void UpdateMainSurfaceClip()
|
||||
{
|
||||
if (MainWindowSurface == null || MainGrid == null)
|
||||
if (MainWindowSurface == null || MainWindowContentRoot == null || MainGrid == null)
|
||||
return;
|
||||
|
||||
double gridWidth = MainGrid.ActualWidth;
|
||||
double gridHeight = MainGrid.ActualHeight;
|
||||
if (gridWidth <= 0 || gridHeight <= 0)
|
||||
double contentWidth = MainWindowContentRoot.ActualWidth;
|
||||
double contentHeight = MainWindowContentRoot.ActualHeight;
|
||||
if (contentWidth <= 0 || contentHeight <= 0)
|
||||
return;
|
||||
|
||||
const double outerRadius = 20d;
|
||||
const double surfaceInset = 1d;
|
||||
double surfaceRadius = Math.Max(0d, outerRadius - surfaceInset);
|
||||
const double contentRadius = 19d;
|
||||
|
||||
MainGrid.Clip = new RectangleGeometry(new Rect(0d, 0d, gridWidth, gridHeight), outerRadius, outerRadius);
|
||||
|
||||
double surfaceWidth = MainWindowSurface.ActualWidth;
|
||||
double surfaceHeight = MainWindowSurface.ActualHeight;
|
||||
if (surfaceWidth > 0 && surfaceHeight > 0)
|
||||
{
|
||||
MainWindowSurface.Clip = new RectangleGeometry(new Rect(0d, 0d, surfaceWidth, surfaceHeight), surfaceRadius, surfaceRadius);
|
||||
}
|
||||
MainGrid.Clip = null;
|
||||
MainWindowSurface.Clip = null;
|
||||
MainWindowContentRoot.Clip = new RectangleGeometry(new Rect(0d, 0d, contentWidth, contentHeight), contentRadius, contentRadius);
|
||||
|
||||
_mainSurfaceClipInitialized = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user