mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
@@ -370,24 +370,24 @@ namespace FancyZonesEditor
|
||||
|
||||
if (delta > 0)
|
||||
{
|
||||
int sourcRow = 0;
|
||||
int sourceRow = 0;
|
||||
for (int row = 0; row < rows; row++)
|
||||
{
|
||||
for (int col = 0; col < cols; col++)
|
||||
{
|
||||
if (row == draggedResizerStartRow + 1 && (col < resizer.StartCol || col >= resizer.EndCol))
|
||||
{
|
||||
newCellChildMap[row, col] = cellChildMap[sourcRow + 1, col];
|
||||
newCellChildMap[row, col] = cellChildMap[sourceRow + 1, col];
|
||||
}
|
||||
else
|
||||
{
|
||||
newCellChildMap[row, col] = cellChildMap[sourcRow, col];
|
||||
newCellChildMap[row, col] = cellChildMap[sourceRow, col];
|
||||
}
|
||||
}
|
||||
|
||||
if (row != draggedResizerStartRow)
|
||||
{
|
||||
sourcRow++;
|
||||
sourceRow++;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -461,10 +461,10 @@ namespace FancyZonesEditor
|
||||
_resizers.Clear();
|
||||
}
|
||||
|
||||
public bool HasSnappedNonAdjascentResizers(GridResizer resizer)
|
||||
public bool HasSnappedNonAdjacentResizers(GridResizer resizer)
|
||||
{
|
||||
/**
|
||||
* Resizers between zones 0,1 and 4,5 are snapped to each other and not adjascent.
|
||||
* Resizers between zones 0,1 and 4,5 are snapped to each other and not adjacent.
|
||||
* ------------------------------
|
||||
* | 0 | 1 |
|
||||
* ------------------------------
|
||||
@@ -473,7 +473,7 @@ namespace FancyZonesEditor
|
||||
* | 4 | 5 |
|
||||
* ------------------------------
|
||||
*
|
||||
* Resizers between zones 0,1 and 2,3 are snapped to each other and adjascent.
|
||||
* Resizers between zones 0,1 and 2,3 are snapped to each other and adjacent.
|
||||
* ------------------------------
|
||||
* | 0 | 1 |
|
||||
* ------------------------------
|
||||
@@ -484,7 +484,7 @@ namespace FancyZonesEditor
|
||||
*
|
||||
* Vertical resizers should have same StartColumn and different StartRow.
|
||||
* Horizontal resizers should have same StartRow and different StartColumn.
|
||||
* Difference between rows or colums should be more than 1.
|
||||
* Difference between rows or columns should be more than 1.
|
||||
*/
|
||||
foreach (GridResizer r in _resizers)
|
||||
{
|
||||
|
||||
@@ -400,7 +400,7 @@ namespace FancyZonesEditor
|
||||
GridData.ResizeInfo resizeInfo = _data.CalculateResizeInfo(resizer, delta);
|
||||
if (resizeInfo.IsResizeAllowed)
|
||||
{
|
||||
if (_dragHandles.HasSnappedNonAdjascentResizers(resizer))
|
||||
if (_dragHandles.HasSnappedNonAdjacentResizers(resizer))
|
||||
{
|
||||
double spacing = 0;
|
||||
Settings settings = ((App)Application.Current).ZoneSettings;
|
||||
|
||||
@@ -158,7 +158,7 @@ IFACEMETHODIMP_(void) FancyZonesSettings::CallCustomAction(PCWSTR action) noexce
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
// Currently only custom action comming from main PowerToys window is request to launch editor.
|
||||
// Currently only custom action coming from main PowerToys window is request to launch editor.
|
||||
// If new custom action is added, error message need to be modified.
|
||||
std::wstring errorMessage = GET_RESOURCE_STRING(IDS_FANCYZONES_EDITOR_LAUNCH_ERROR) + L" " + NonLocalizable::PowerToysIssuesURL;
|
||||
MessageBox(NULL,
|
||||
|
||||
@@ -96,7 +96,7 @@ namespace VirtualDesktopUtils
|
||||
// Second fallback scenario is to get array of virtual desktops stored in registry, but not kept per
|
||||
// session. Note that we are taking first element from virtual desktop array, which is primary desktop.
|
||||
// If user has more than one virtual desktop, one of previous functions should return correct value,
|
||||
// as desktop switch occured in current session.
|
||||
// as desktop switch occurred in current session.
|
||||
else
|
||||
{
|
||||
std::vector<GUID> ids{};
|
||||
|
||||
Reference in New Issue
Block a user