diff --git a/src/core/Microsoft.PowerToys.Settings.UI.Lib/FZConfigProperties.cs b/src/core/Microsoft.PowerToys.Settings.UI.Lib/FZConfigProperties.cs index 146a5b2ac3..89814dfa31 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI.Lib/FZConfigProperties.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI.Lib/FZConfigProperties.cs @@ -10,14 +10,16 @@ namespace Microsoft.PowerToys.Settings.UI.Lib public FZConfigProperties() { this.FancyzonesShiftDrag = new BoolProperty(); + this.FancyzonesMouseSwitch = new BoolProperty(); this.FancyzonesOverrideSnapHotkeys = new BoolProperty(); - this.FancyzonesZoneSetChangeFlashZones = new BoolProperty(); + this.FancyzonesMoveWindowsAcrossMonitors = new BoolProperty(); this.FancyzonesDisplayChangeMoveWindows = new BoolProperty(); this.FancyzonesZoneSetChangeMoveWindows = new BoolProperty(); this.FancyzonesVirtualDesktopChangeMoveWindows = new BoolProperty(); this.FancyzonesAppLastZoneMoveWindows = new BoolProperty(); this.UseCursorposEditorStartupscreen = new BoolProperty(); this.FancyzonesShowOnAllMonitors = new BoolProperty(); + this.FancyzonesMakeDraggedWindowTransparent = new BoolProperty(); this.FancyzonesZoneHighlightColor = new StringProperty(); this.FancyzonesHighlightOpacity = new IntProperty(); this.FancyzonesEditorHotkey = new KeyBoardKeysProperty(); @@ -29,11 +31,14 @@ namespace Microsoft.PowerToys.Settings.UI.Lib [JsonPropertyName("fancyzones_shiftDrag")] public BoolProperty FancyzonesShiftDrag { get; set; } + [JsonPropertyName("fancyzones_mouseSwitch")] + public BoolProperty FancyzonesMouseSwitch { get; set; } + [JsonPropertyName("fancyzones_overrideSnapHotkeys")] public BoolProperty FancyzonesOverrideSnapHotkeys { get; set; } - [JsonPropertyName("fancyzones_zoneSetChange_flashZones")] - public BoolProperty FancyzonesZoneSetChangeFlashZones { get; set; } + [JsonPropertyName("fancyzones_moveWindowAcrossMonitors")] + public BoolProperty FancyzonesMoveWindowsAcrossMonitors { get; set; } [JsonPropertyName("fancyzones_displayChange_moveWindows")] public BoolProperty FancyzonesDisplayChangeMoveWindows { get; set; } @@ -53,6 +58,9 @@ namespace Microsoft.PowerToys.Settings.UI.Lib [JsonPropertyName("fancyzones_show_on_all_monitors")] public BoolProperty FancyzonesShowOnAllMonitors { get; set; } + [JsonPropertyName("fancyzones_makeDraggedWindowTransparent")] + public BoolProperty FancyzonesMakeDraggedWindowTransparent { get; set; } + [JsonPropertyName("fancyzones_zoneHighlightColor")] public StringProperty FancyzonesZoneHighlightColor { get; set; } diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw b/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw index 408431a5af..b66a388f00 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw +++ b/src/core/Microsoft.PowerToys.Settings.UI/Strings/en-us/Resources.resw @@ -287,6 +287,15 @@ Launch Zones Editor + + Make dragged window transparent + + + Hold a non-primary mouse button to activate zones while dragging + + + Move windows between zones across all monitors when snapping with win+arrow + Override Windows Snap hotkeys (Win + arrow) to move windows between zones @@ -294,7 +303,10 @@ Save Zone Highlight Color Choice - Hold Shift key or any non-primary mouse button to enable zones while dragging + Hold Shift key to activate zones while dragging + + + Show zones on all monitors while dragging a window Follow mouse cursor instead of focus when launching editor in a multi screen environment @@ -308,9 +320,6 @@ Zone highlight color (default: #0078D7) - - Flash zones when the active FancyZones layout changes - During zone layout changes, windows assigned to a zone will match new size/positions diff --git a/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/FancyZonesViewModel.cs b/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/FancyZonesViewModel.cs index 6aa8bc4a4c..84c5688c97 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/FancyZonesViewModel.cs +++ b/src/core/Microsoft.PowerToys.Settings.UI/ViewModels/FancyZonesViewModel.cs @@ -38,14 +38,16 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels this.LaunchEditorEventHandler = new ButtonClickCommand(LaunchEditor); this._shiftDrag = Settings.Properties.FancyzonesShiftDrag.Value; + this._mouseSwitch = Settings.Properties.FancyzonesMouseSwitch.Value; this._overrideSnapHotkeys = Settings.Properties.FancyzonesOverrideSnapHotkeys.Value; - this._flashZones = Settings.Properties.FancyzonesZoneSetChangeFlashZones.Value; + this._moveWindowsAcrossMonitors = Settings.Properties.FancyzonesMoveWindowsAcrossMonitors.Value; this._displayChangemoveWindows = Settings.Properties.FancyzonesDisplayChangeMoveWindows.Value; this._zoneSetChangeMoveWindows = Settings.Properties.FancyzonesZoneSetChangeMoveWindows.Value; this._virtualDesktopChangeMoveWindows = Settings.Properties.FancyzonesVirtualDesktopChangeMoveWindows.Value; this._appLastZoneMoveWindows = Settings.Properties.FancyzonesAppLastZoneMoveWindows.Value; this._useCursorPosEditorStartupScreen = Settings.Properties.UseCursorposEditorStartupscreen.Value; this._showOnAllMonitors = Settings.Properties.FancyzonesShowOnAllMonitors.Value; + this._makeDraggedWindowTransparent = Settings.Properties.FancyzonesMakeDraggedWindowTransparent.Value; this._highlightOpacity = Settings.Properties.FancyzonesHighlightOpacity.Value; this._excludedApps = Settings.Properties.FancyzonesExcludedApps.Value; this._editorHotkey = Settings.Properties.FancyzonesEditorHotkey.Value; @@ -75,14 +77,16 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels private bool _isEnabled; private bool _shiftDrag; + private bool _mouseSwitch; private bool _overrideSnapHotkeys; - private bool _flashZones; + private bool _moveWindowsAcrossMonitors; private bool _displayChangemoveWindows; private bool _zoneSetChangeMoveWindows; private bool _virtualDesktopChangeMoveWindows; private bool _appLastZoneMoveWindows; private bool _useCursorPosEditorStartupScreen; private bool _showOnAllMonitors; + private bool _makeDraggedWindowTransparent; private int _highlightOpacity; private string _excludedApps; @@ -131,6 +135,24 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels } } + public bool MouseSwitch + { + get + { + return _mouseSwitch; + } + + set + { + if (value != _mouseSwitch) + { + _mouseSwitch = value; + Settings.Properties.FancyzonesMouseSwitch.Value = value; + RaisePropertyChanged(); + } + } + } + public bool OverrideSnapHotkeys { get @@ -149,19 +171,19 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels } } - public bool ZoneSetChangeFlashZones + public bool MoveWindowsAcrossMonitors { get { - return _flashZones; + return _moveWindowsAcrossMonitors; } set { - if (value != _flashZones) + if (value != _moveWindowsAcrossMonitors) { - _flashZones = value; - Settings.Properties.FancyzonesZoneSetChangeFlashZones.Value = value; + _moveWindowsAcrossMonitors = value; + Settings.Properties.FancyzonesMoveWindowsAcrossMonitors.Value = value; RaisePropertyChanged(); } } @@ -275,6 +297,24 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels } } + public bool MakeDraggedWindowsTransparent + { + get + { + return _makeDraggedWindowTransparent; + } + + set + { + if (value != _makeDraggedWindowTransparent) + { + _makeDraggedWindowTransparent = value; + Settings.Properties.FancyzonesMakeDraggedWindowTransparent.Value = value; + RaisePropertyChanged(); + } + } + } + public Color ZoneHighlightColor { get diff --git a/src/core/Microsoft.PowerToys.Settings.UI/Views/FancyZonesPage.xaml b/src/core/Microsoft.PowerToys.Settings.UI/Views/FancyZonesPage.xaml index f5af0edf8b..91ed8651c5 100644 --- a/src/core/Microsoft.PowerToys.Settings.UI/Views/FancyZonesPage.xaml +++ b/src/core/Microsoft.PowerToys.Settings.UI/Views/FancyZonesPage.xaml @@ -81,13 +81,19 @@ IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled}" /> + + - @@ -117,6 +123,16 @@ Margin="{StaticResource SmallTopMargin}" IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled}"/> + + + +