From bb5d4dfbf0456d4096c884ff54a1f4c130283ec5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivan=20Sto=C5=A1i=C4=87?= Date: Wed, 7 Apr 2021 09:30:35 +0200 Subject: [PATCH] Fixed an issue with zone sizes (#10609) --- src/modules/fancyzones/lib/ZoneSet.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/fancyzones/lib/ZoneSet.cpp b/src/modules/fancyzones/lib/ZoneSet.cpp index 4ce1f28fe8..1f4dd7376a 100644 --- a/src/modules/fancyzones/lib/ZoneSet.cpp +++ b/src/modules/fancyzones/lib/ZoneSet.cpp @@ -882,9 +882,9 @@ bool ZoneSet::CalculateGridZones(Rect workArea, FancyZonesDataTypes::GridLayoutI long bottom = rowInfo[maxRow].End; top += row == 0 ? spacing : spacing / 2; - bottom -= row == gridLayoutInfo.rows() - 1 ? spacing : spacing / 2; + bottom -= maxRow == gridLayoutInfo.rows() - 1 ? spacing : spacing / 2; left += col == 0 ? spacing : spacing / 2; - right -= col == gridLayoutInfo.columns() - 1 ? spacing : spacing / 2; + right -= maxCol == gridLayoutInfo.columns() - 1 ? spacing : spacing / 2; auto zone = MakeZone(RECT{ left, top, right, bottom }, i); if (zone)