fix(ui): enforce rounded corners via unified root and window clip
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
- 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 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.
|
||||
- Eckradius über einen einheitlichen Root-/Window-Clip und einen inneren Inhalts-Clip 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
|
||||
|
||||
@@ -346,7 +346,7 @@
|
||||
</Window.TaskbarItemInfo>
|
||||
<shell:WindowChrome.WindowChrome>
|
||||
<shell:WindowChrome CaptionHeight="72"
|
||||
CornerRadius="20"
|
||||
CornerRadius="0"
|
||||
GlassFrameThickness="0"
|
||||
ResizeBorderThickness="0"
|
||||
UseAeroCaptionButtons="False" />
|
||||
|
||||
@@ -2175,14 +2175,31 @@ namespace C4IT_CustomerPanel
|
||||
if (MainWindowSurface == null || MainWindowContentRoot == null || MainGrid == null)
|
||||
return;
|
||||
|
||||
double gridWidth = MainGrid.ActualWidth;
|
||||
double gridHeight = MainGrid.ActualHeight;
|
||||
if (gridWidth <= 0 || gridHeight <= 0)
|
||||
return;
|
||||
|
||||
double contentWidth = MainWindowContentRoot.ActualWidth;
|
||||
double contentHeight = MainWindowContentRoot.ActualHeight;
|
||||
if (contentWidth <= 0 || contentHeight <= 0)
|
||||
return;
|
||||
|
||||
const double outerRadius = 20d;
|
||||
const double outerInset = 0.5d;
|
||||
const double contentRadius = 19d;
|
||||
|
||||
MainGrid.Clip = null;
|
||||
double outerWidth = Math.Max(0d, gridWidth - (outerInset * 2d));
|
||||
double outerHeight = Math.Max(0d, gridHeight - (outerInset * 2d));
|
||||
double clippedOuterRadius = Math.Max(0d, outerRadius - outerInset);
|
||||
RectangleGeometry outerClip = new RectangleGeometry(
|
||||
new Rect(outerInset, outerInset, outerWidth, outerHeight),
|
||||
clippedOuterRadius,
|
||||
clippedOuterRadius);
|
||||
|
||||
MainGrid.Clip = outerClip;
|
||||
this.Clip = outerClip.Clone();
|
||||
|
||||
MainWindowSurface.Clip = null;
|
||||
MainWindowContentRoot.Clip = new RectangleGeometry(new Rect(0d, 0d, contentWidth, contentHeight), contentRadius, contentRadius);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user