mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-12 10:19:20 +08:00
Fix difference in editor and applied focus layout zones size and increments (#5601)
This commit is contained in:
parent
1d8ca28152
commit
f50a8e5252
@ -293,6 +293,8 @@ namespace FancyZonesEditor
|
||||
ZoneCount = 3;
|
||||
}
|
||||
|
||||
// If changing focus layout zones size and/or increment,
|
||||
// same change should be applied in ZoneSet.cpp (ZoneSet::CalculateFocusLayout)
|
||||
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;
|
||||
|
@ -423,15 +423,15 @@ bool ZoneSet::CalculateFocusLayout(Rect workArea, int zoneCount) noexcept
|
||||
{
|
||||
bool success = true;
|
||||
|
||||
long left{ long(workArea.width() * 0.1) };
|
||||
long top{ long(workArea.height() * 0.1) };
|
||||
long right{ left + long(workArea.width() * 0.6) };
|
||||
long bottom{ top + long(workArea.height() * 0.6) };
|
||||
long left{ 100 };
|
||||
long top{ 100 };
|
||||
long right{ left + long(workArea.width() * 0.4) };
|
||||
long bottom{ top + long(workArea.height() * 0.4) };
|
||||
|
||||
RECT focusZoneRect{ left, top, right, bottom };
|
||||
|
||||
long focusRectXIncrement = (zoneCount <= 1) ? 0 : (int)(workArea.width() * 0.2) / (zoneCount - 1);
|
||||
long focusRectYIncrement = (zoneCount <= 1) ? 0 : (int)(workArea.height() * 0.2) / (zoneCount - 1);
|
||||
long focusRectXIncrement = (zoneCount <= 1) ? 0 : 50;
|
||||
long focusRectYIncrement = (zoneCount <= 1) ? 0 : 50;
|
||||
|
||||
if (left >= right || top >= bottom || left < 0 || right < 0 || top < 0 || bottom < 0)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user