Clip main surface to rounded geometry to prevent corner overflow
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user