Harden rounded clip timing and pixel alignment for all corners
This commit is contained in:
@@ -74,6 +74,7 @@ namespace C4IT_CustomerPanel
|
||||
private TimeSpan _lastAdHocInterval;
|
||||
private TimeSpan _lastRegularInterval;
|
||||
private bool _allowApplicationShutdown = false;
|
||||
private bool _mainSurfaceClipInitialized = false;
|
||||
internal DateTime lastUpdate;
|
||||
|
||||
//private Dictionary<announcementType, List<Guid>> announcementIDCollection = new Dictionary<announcementType, List<Guid>>();
|
||||
@@ -232,6 +233,13 @@ namespace C4IT_CustomerPanel
|
||||
private void Window_Loaded(object sender, RoutedEventArgs e)
|
||||
{
|
||||
ComputerInfoCtrl.FillMainInfoGrid();
|
||||
UpdateMainSurfaceClip();
|
||||
|
||||
if (!_mainSurfaceClipInitialized)
|
||||
{
|
||||
Dispatcher.BeginInvoke(new Action(UpdateMainSurfaceClip), DispatcherPriority.Loaded);
|
||||
Dispatcher.BeginInvoke(new Action(UpdateMainSurfaceClip), DispatcherPriority.Render);
|
||||
}
|
||||
|
||||
NetworkChange.NetworkAddressChanged += new NetworkAddressChangedEventHandler(AddressChangedCallback);
|
||||
}
|
||||
@@ -2173,7 +2181,7 @@ namespace C4IT_CustomerPanel
|
||||
return;
|
||||
|
||||
const double outerRadius = 20d;
|
||||
const double clipInset = 1d;
|
||||
const double clipInset = 0.5d;
|
||||
double clipWidth = Math.Max(0d, width - (clipInset * 2d));
|
||||
double clipHeight = Math.Max(0d, height - (clipInset * 2d));
|
||||
double clipRadius = Math.Max(0d, outerRadius - clipInset);
|
||||
@@ -2182,6 +2190,8 @@ namespace C4IT_CustomerPanel
|
||||
new Rect(clipInset, clipInset, clipWidth, clipHeight),
|
||||
clipRadius,
|
||||
clipRadius);
|
||||
|
||||
_mainSurfaceClipInitialized = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user