mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-09 20:57:22 +02:00
Fix different grid layout shown by editor than the engine (#4758)
This commit is contained in:
@@ -568,6 +568,7 @@ namespace FancyZonesEditor
|
|||||||
left += cellWidth + spacing;
|
left += cellWidth + spacing;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int zoneNumber = 1;
|
||||||
for (int row = 0; row < rows; row++)
|
for (int row = 0; row < rows; row++)
|
||||||
{
|
{
|
||||||
for (int col = 0; col < cols; col++)
|
for (int col = 0; col < cols; col++)
|
||||||
@@ -582,7 +583,7 @@ namespace FancyZonesEditor
|
|||||||
top = _rowInfo[row].Start;
|
top = _rowInfo[row].Start;
|
||||||
Canvas.SetLeft(zone, left);
|
Canvas.SetLeft(zone, left);
|
||||||
Canvas.SetTop(zone, top);
|
Canvas.SetTop(zone, top);
|
||||||
zone.LabelID.Content = i + 1;
|
zone.LabelID.Content = zoneNumber++;
|
||||||
|
|
||||||
int maxRow = row;
|
int maxRow = row;
|
||||||
while (((maxRow + 1) < rows) && (model.CellChildMap[maxRow + 1, col] == i))
|
while (((maxRow + 1) < rows) && (model.CellChildMap[maxRow + 1, col] == i))
|
||||||
|
|||||||
@@ -329,9 +329,9 @@ namespace FancyZonesEditor
|
|||||||
}
|
}
|
||||||
|
|
||||||
int index = ZoneCount - 1;
|
int index = ZoneCount - 1;
|
||||||
for (int row = rows - 1; row >= 0; row--)
|
for (int col = cols - 1; col >= 0; col--)
|
||||||
{
|
{
|
||||||
for (int col = cols - 1; col >= 0; col--)
|
for (int row = rows - 1; row >= 0; row--)
|
||||||
{
|
{
|
||||||
_gridModel.CellChildMap[row, col] = index--;
|
_gridModel.CellChildMap[row, col] = index--;
|
||||||
if (index < 0)
|
if (index < 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user