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