mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-06 03:07:04 +02:00
Use same zone set initially for new virtual desktops of same monitor (#815)
This commit is contained in:
committed by
Enrico Giordani
parent
add63d2dde
commit
014c2c5249
@@ -36,7 +36,7 @@ namespace FancyZonesEditor
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Settings()
|
||||
{
|
||||
ParseCommandLineArgs();
|
||||
@@ -64,9 +64,9 @@ namespace FancyZonesEditor
|
||||
|
||||
_blankCustomModel = new CanvasLayoutModel("Create new custom", c_blankCustomModelId, (int)_workArea.Width, (int)_workArea.Height);
|
||||
|
||||
_zoneCount = (int)Registry.GetValue(_uniqueRegistryPath, "ZoneCount", 3);
|
||||
_spacing = (int)Registry.GetValue(_uniqueRegistryPath, "Spacing", 16);
|
||||
_showSpacing = (int)Registry.GetValue(_uniqueRegistryPath, "ShowSpacing", 1) == 1;
|
||||
_zoneCount = ReadRegistryInt("ZoneCount", 3);
|
||||
_spacing = ReadRegistryInt("Spacing", 16);
|
||||
_showSpacing = ReadRegistryInt("ShowSpacing", 1) == 1;
|
||||
|
||||
UpdateLayoutModels();
|
||||
}
|
||||
@@ -181,6 +181,12 @@ namespace FancyZonesEditor
|
||||
}
|
||||
private static float _dpi;
|
||||
|
||||
private int ReadRegistryInt(string valueName, int defaultValue)
|
||||
{
|
||||
object obj = Registry.GetValue(_uniqueRegistryPath, valueName, defaultValue);
|
||||
return (obj != null) ? (int)obj : defaultValue;
|
||||
}
|
||||
|
||||
// UpdateLayoutModels
|
||||
// Update the five default layouts based on the new ZoneCount
|
||||
private void UpdateLayoutModels()
|
||||
|
||||
Reference in New Issue
Block a user