fix(layout): inset content clip inside rounded border

This commit is contained in:
Meik
2026-03-05 16:49:36 +01:00
parent 9dbed4f45e
commit 0b4f5f3d70
2 changed files with 14 additions and 2 deletions

View File

@@ -2184,12 +2184,24 @@ namespace C4IT_CustomerPanel
const double surfaceRadius = 20d;
const double contentRadius = 19d;
double contentInset = Math.Max(0d, MainWindowSurface.BorderThickness.Left);
MainGrid.Clip = null;
this.Clip = null;
MainWindowSurface.Clip = new RectangleGeometry(new Rect(0d, 0d, surfaceWidth, surfaceHeight), surfaceRadius, surfaceRadius);
MainWindowContentRoot.Clip = new RectangleGeometry(new Rect(0d, 0d, contentWidth, contentHeight), contentRadius, contentRadius);
double clippedContentWidth = Math.Max(0d, contentWidth - (contentInset * 2d));
double clippedContentHeight = Math.Max(0d, contentHeight - (contentInset * 2d));
double clippedContentRadius = Math.Max(0d, contentRadius - contentInset);
if (clippedContentWidth > 0d && clippedContentHeight > 0d)
{
MainWindowContentRoot.Clip = new RectangleGeometry(
new Rect(contentInset, contentInset, clippedContentWidth, clippedContentHeight),
clippedContentRadius,
clippedContentRadius);
}
if (btnSP != null && btnSP.ActualWidth > 0d && btnSP.ActualHeight > 0d)
{