mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +01:00
Fixed crash with big 'Space around zones' values (#6815)
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
// The Microsoft Corporation licenses this file to you under the MIT license.
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
||||||
// See the LICENSE file in the project root for more information.
|
// See the LICENSE file in the project root for more information.
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
@@ -171,8 +172,8 @@ namespace FancyZonesEditor
|
|||||||
maxCol++;
|
maxCol++;
|
||||||
}
|
}
|
||||||
|
|
||||||
rect.Width = colInfo[maxCol].End - left;
|
rect.Width = Math.Max(0, colInfo[maxCol].End - left);
|
||||||
rect.Height = rowInfo[maxRow].End - top;
|
rect.Height = Math.Max(0, rowInfo[maxRow].End - top);
|
||||||
rect.StrokeThickness = 1;
|
rect.StrokeThickness = 1;
|
||||||
rect.Stroke = Brushes.DarkGray;
|
rect.Stroke = Brushes.DarkGray;
|
||||||
rect.Fill = Brushes.LightGray;
|
rect.Fill = Brushes.LightGray;
|
||||||
|
|||||||
Reference in New Issue
Block a user