From 55cda1790aedfe7d419e5a2babc3cd9d3cd9283c Mon Sep 17 00:00:00 2001 From: Meik Date: Thu, 5 Mar 2026 16:01:29 +0100 Subject: [PATCH] fix(ui): remove window clip to eliminate black rounded corners --- Changelog.md | 2 +- MainWindow.xaml | 2 +- MainWindow.xaml.cs | 19 ++----------------- 3 files changed, 4 insertions(+), 19 deletions(-) diff --git a/Changelog.md b/Changelog.md index 2822e16..e36292d 100644 --- a/Changelog.md +++ b/Changelog.md @@ -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 über einen einheitlichen Root-/Window-Clip und einen inneren Inhalts-Clip abgestimmt, damit Inhalte in allen vier Ecken innerhalb des Rahmens bleiben. +- Eckradius von WindowChrome, Hauptfläche und innerem 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 diff --git a/MainWindow.xaml b/MainWindow.xaml index e995e24..272dd86 100644 --- a/MainWindow.xaml +++ b/MainWindow.xaml @@ -346,7 +346,7 @@ diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index 4bc3205..017fd6d 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -2175,30 +2175,15 @@ 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; - 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(); + MainGrid.Clip = null; + this.Clip = null; MainWindowSurface.Clip = null; MainWindowContentRoot.Clip = new RectangleGeometry(new Rect(0d, 0d, contentWidth, contentHeight), contentRadius, contentRadius);