[FancyZones Editor] Prevent new zones from being unreachable (#4457)

* stack new zones

* Changed startup location of window editor

* Zones start in upper left

* Changed Focus Zone Initialization

* Zones.Add

* Reset zone position when it goes off screen
This commit is contained in:
ColdTune
2020-07-23 03:53:19 -05:00
committed by GitHub
parent efa04b4cd8
commit c379cca2e5
2 changed files with 15 additions and 5 deletions

View File

@@ -292,9 +292,9 @@ namespace FancyZonesEditor
ZoneCount = 3;
}
Int32Rect focusZoneRect = new Int32Rect((int)(WorkArea.Width * 0.1), (int)(WorkArea.Height * 0.1), (int)(WorkArea.Width * 0.6), (int)(WorkArea.Height * 0.6));
int focusRectXIncrement = (ZoneCount <= 1) ? 0 : (int)(WorkArea.Width * 0.2) / (ZoneCount - 1);
int focusRectYIncrement = (ZoneCount <= 1) ? 0 : (int)(WorkArea.Height * 0.2) / (ZoneCount - 1);
Int32Rect focusZoneRect = new Int32Rect(100, 100, (int)(WorkArea.Width * 0.4), (int)(WorkArea.Height * 0.4));
int focusRectXIncrement = (ZoneCount <= 1) ? 0 : 50;
int focusRectYIncrement = (ZoneCount <= 1) ? 0 : 50;
for (int i = 0; i < ZoneCount; i++)
{