mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 03:36:44 +02:00
Win arrows revisited (#5932)
* Added the setting * Refactored existing code, the main feature isn't implemented yet * Renamed a method * Updated a comment in IZoneWindow * Added the zone selection algorithm, didn't test it * Basic features work * Single monitor cycling works * Seems that the feature works well * Polished the settings page * Rebase fix * Fixed a null pointer dereference * Use classic if syntax * Fixed bad indentation How did these lines unindent themselves? * Removed TODO comment * Rebase fix * Another rebase fix
This commit is contained in:
@@ -17,6 +17,7 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
FancyzonesOverrideSnapHotkeys = new BoolProperty();
|
||||
FancyzonesMouseSwitch = new BoolProperty();
|
||||
FancyzonesMoveWindowsAcrossMonitors = new BoolProperty();
|
||||
FancyzonesMoveWindowsBasedOnPosition = new BoolProperty();
|
||||
FancyzonesDisplayChangeMoveWindows = new BoolProperty();
|
||||
FancyzonesZoneSetChangeMoveWindows = new BoolProperty();
|
||||
FancyzonesAppLastZoneMoveWindows = new BoolProperty();
|
||||
@@ -46,6 +47,9 @@ namespace Microsoft.PowerToys.Settings.UI.Lib
|
||||
[JsonPropertyName("fancyzones_moveWindowAcrossMonitors")]
|
||||
public BoolProperty FancyzonesMoveWindowsAcrossMonitors { get; set; }
|
||||
|
||||
[JsonPropertyName("fancyzones_moveWindowsBasedOnPosition")]
|
||||
public BoolProperty FancyzonesMoveWindowsBasedOnPosition { get; set; }
|
||||
|
||||
[JsonPropertyName("fancyzones_displayChange_moveWindows")]
|
||||
public BoolProperty FancyzonesDisplayChangeMoveWindows { get; set; }
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ namespace Microsoft.PowerToys.Settings.UI.Lib.ViewModels
|
||||
_mouseSwitch = Settings.Properties.FancyzonesMouseSwitch.Value;
|
||||
_overrideSnapHotkeys = Settings.Properties.FancyzonesOverrideSnapHotkeys.Value;
|
||||
_moveWindowsAcrossMonitors = Settings.Properties.FancyzonesMoveWindowsAcrossMonitors.Value;
|
||||
_moveWindowsBasedOnPosition = Settings.Properties.FancyzonesMoveWindowsBasedOnPosition.Value;
|
||||
_displayChangemoveWindows = Settings.Properties.FancyzonesDisplayChangeMoveWindows.Value;
|
||||
_zoneSetChangeMoveWindows = Settings.Properties.FancyzonesZoneSetChangeMoveWindows.Value;
|
||||
_appLastZoneMoveWindows = Settings.Properties.FancyzonesAppLastZoneMoveWindows.Value;
|
||||
@@ -84,6 +85,7 @@ namespace Microsoft.PowerToys.Settings.UI.Lib.ViewModels
|
||||
private bool _mouseSwitch;
|
||||
private bool _overrideSnapHotkeys;
|
||||
private bool _moveWindowsAcrossMonitors;
|
||||
private bool _moveWindowsBasedOnPosition;
|
||||
private bool _displayChangemoveWindows;
|
||||
private bool _zoneSetChangeMoveWindows;
|
||||
private bool _appLastZoneMoveWindows;
|
||||
@@ -119,10 +121,19 @@ namespace Microsoft.PowerToys.Settings.UI.Lib.ViewModels
|
||||
|
||||
SendConfigMSG(snd.ToString());
|
||||
OnPropertyChanged("IsEnabled");
|
||||
OnPropertyChanged("SnapHotkeysCategoryEnabled");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool SnapHotkeysCategoryEnabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return _isEnabled && _overrideSnapHotkeys;
|
||||
}
|
||||
}
|
||||
|
||||
public bool ShiftDrag
|
||||
{
|
||||
get
|
||||
@@ -178,6 +189,7 @@ namespace Microsoft.PowerToys.Settings.UI.Lib.ViewModels
|
||||
_overrideSnapHotkeys = value;
|
||||
Settings.Properties.FancyzonesOverrideSnapHotkeys.Value = value;
|
||||
RaisePropertyChanged();
|
||||
OnPropertyChanged("SnapHotkeysCategoryEnabled");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -200,6 +212,24 @@ namespace Microsoft.PowerToys.Settings.UI.Lib.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public bool MoveWindowsBasedOnPosition
|
||||
{
|
||||
get
|
||||
{
|
||||
return _moveWindowsBasedOnPosition;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != _moveWindowsBasedOnPosition)
|
||||
{
|
||||
_moveWindowsBasedOnPosition = value;
|
||||
Settings.Properties.FancyzonesMoveWindowsBasedOnPosition.Value = value;
|
||||
RaisePropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool DisplayChangeMoveWindows
|
||||
{
|
||||
get
|
||||
|
||||
Reference in New Issue
Block a user