mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 11:16:51 +02:00
Fixed an issue where zones do not fill up the whole screen (#1458)
* Fixed an issue where zones do not fill up the whole screen * Fixup: Added comments, removed extra semicolons
This commit is contained in:
@@ -286,7 +286,11 @@ namespace FancyZonesEditor
|
||||
{
|
||||
_rowsModel.CellChildMap[i, 0] = i;
|
||||
_columnsModel.CellChildMap[0, i] = i;
|
||||
_rowsModel.RowPercents[i] = _multiplier / ZoneCount; // _columnsModel is sharing the same array
|
||||
|
||||
// Note: This is NOT equal to _multiplier / ZoneCount and is done like this to make
|
||||
// the sum of all RowPercents exactly (_multiplier).
|
||||
// _columnsModel is sharing the same array
|
||||
_rowsModel.RowPercents[i] = ((_multiplier * (i + 1)) / ZoneCount) - ((_multiplier * i) / ZoneCount);
|
||||
}
|
||||
|
||||
// Update the "Grid" Default Layout
|
||||
@@ -313,14 +317,16 @@ namespace FancyZonesEditor
|
||||
_gridModel.ColumnPercents = new int[cols];
|
||||
_gridModel.CellChildMap = new int[rows, cols];
|
||||
|
||||
// Note: The following are NOT equal to _multiplier divided by rows or columns and is
|
||||
// done like this to make the sum of all RowPercents exactly (_multiplier).
|
||||
for (int row = 0; row < rows; row++)
|
||||
{
|
||||
_gridModel.RowPercents[row] = _multiplier / rows;
|
||||
_gridModel.RowPercents[row] = ((_multiplier * (row + 1)) / rows) - ((_multiplier * row) / rows);
|
||||
}
|
||||
|
||||
for (int col = 0; col < cols; col++)
|
||||
{
|
||||
_gridModel.ColumnPercents[col] = _multiplier / cols;
|
||||
_gridModel.ColumnPercents[col] = ((_multiplier * (col + 1)) / cols) - ((_multiplier * col) / cols);
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
|
||||
Reference in New Issue
Block a user