From ac427c2c72b60381c59234859cd609d3b67ecbbe Mon Sep 17 00:00:00 2001 From: Meik Date: Thu, 5 Mar 2026 15:30:01 +0100 Subject: [PATCH] Clip main surface to rounded geometry to prevent corner overflow --- Changelog.md | 1 + MainWindow.xaml.cs | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/Changelog.md b/Changelog.md index b2369a0..f8659a7 100644 --- a/Changelog.md +++ b/Changelog.md @@ -7,6 +7,7 @@ - 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 versehen, damit Inhalte nicht über den Außenrahmen in die Ecken hinausragen. ### Navigation und Interaktion - Navigation-Buttons neu ausgerichtet (horizontal/vertikal), Icons vergrößert und Zustände vereinheitlicht. diff --git a/MainWindow.xaml.cs b/MainWindow.xaml.cs index 7e5a062..c2081c2 100644 --- a/MainWindow.xaml.cs +++ b/MainWindow.xaml.cs @@ -144,6 +144,7 @@ namespace C4IT_CustomerPanel FormHelper.GetLocation((int)this.Width, (int)this.Height, (double)ConfigSettings.local_currentDPI / 96); SetAppearance(true); + UpdateMainSurfaceClip(); SetLocation(); CustomerPanelSecurePassword.Init(); @@ -2157,9 +2158,23 @@ namespace C4IT_CustomerPanel private void Window_SizeChanged(object sender, SizeChangedEventArgs e) { + UpdateMainSurfaceClip(); SetLocation(); } + private void UpdateMainSurfaceClip() + { + if (MainWindowSurface == null) + return; + + double width = MainWindowSurface.ActualWidth; + double height = MainWindowSurface.ActualHeight; + if (width <= 0 || height <= 0) + return; + + MainWindowSurface.Clip = new RectangleGeometry(new Rect(0, 0, width, height), 20, 20); + } + } public class cMainFunctionInfo