[FancyZones] Restore original corners and setting(#17425)

* fix corners

* save corner preference

* added fz setting

* add option to settings

* return original preference despite the setting

* removed reset to default corner preference
This commit is contained in:
Seraphima Zykova
2022-04-01 18:28:19 +02:00
committed by GitHub
parent 04588bc7e0
commit 95dcbb1891
14 changed files with 155 additions and 10 deletions

View File

@@ -86,6 +86,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
_makeDraggedWindowTransparent = Settings.Properties.FancyzonesMakeDraggedWindowTransparent.Value;
_allowPopupWindowSnap = Settings.Properties.FancyzonesAllowPopupWindowSnap.Value;
_allowChildWindowSnap = Settings.Properties.FancyzonesAllowChildWindowSnap.Value;
_disableRoundCornersOnSnap = Settings.Properties.FancyzonesDisableRoundCornersOnSnap.Value;
_highlightOpacity = Settings.Properties.FancyzonesHighlightOpacity.Value;
_excludedApps = Settings.Properties.FancyzonesExcludedApps.Value;
_systemTheme = Settings.Properties.FancyzonesSystemTheme.Value;
@@ -135,6 +136,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
private bool _showZoneNumber;
private bool _allowPopupWindowSnap;
private bool _allowChildWindowSnap;
private bool _disableRoundCornersOnSnap;
private int _highlightOpacity;
private string _excludedApps;
@@ -602,6 +604,24 @@ namespace Microsoft.PowerToys.Settings.UI.Library.ViewModels
}
}
public bool DisableRoundCornersOnWindowSnap
{
get
{
return _disableRoundCornersOnSnap;
}
set
{
if (_disableRoundCornersOnSnap != value)
{
_disableRoundCornersOnSnap = value;
Settings.Properties.FancyzonesDisableRoundCornersOnSnap.Value = value;
NotifyPropertyChanged();
}
}
}
// For the following setters we use OrdinalIgnoreCase string comparison since
// we expect value to be a hex code.
public string ZoneHighlightColor