updated FancyZones checkboxes corresponding to settings (#2785)

This commit is contained in:
Seraphima Zykova 2020-05-07 23:29:02 +03:00 committed by GitHub
parent 1056dac070
commit 7f42d9784e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 89 additions and 16 deletions

View File

@ -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; }

View File

@ -287,6 +287,15 @@
<data name="FancyZones_LaunchEditorButtonControl_Header.Content" xml:space="preserve">
<value>Launch Zones Editor</value>
</data>
<data name="FancyZones_MakeDraggedWindowTransparentCheckBoxControl.Content" xml:space="preserve">
<value>Make dragged window transparent</value>
</data>
<data name="FancyZones_MouseDragCheckBoxControl_Header.Content" xml:space="preserve">
<value>Hold a non-primary mouse button to activate zones while dragging</value>
</data>
<data name="FancyZones_MoveVindowsAcrossAllMonitorsCheckBoxControl.Content" xml:space="preserve">
<value>Move windows between zones across all monitors when snapping with win+arrow</value>
</data>
<data name="FancyZones_OverrideSnapHotkeysCheckBoxControl.Content" xml:space="preserve">
<value>Override Windows Snap hotkeys (Win + arrow) to move windows between zones</value>
</data>
@ -294,7 +303,10 @@
<value>Save Zone Highlight Color Choice</value>
</data>
<data name="FancyZones_ShiftDragCheckBoxControl_Header.Content" xml:space="preserve">
<value>Hold Shift key or any non-primary mouse button to enable zones while dragging</value>
<value>Hold Shift key to activate zones while dragging</value>
</data>
<data name="FancyZones_ShowZonesOnAllMonitorsCheckBoxControl.Content" xml:space="preserve">
<value>Show zones on all monitors while dragging a window</value>
</data>
<data name="FancyZones_UseCursorPosEditorStartupScreen.Content" xml:space="preserve">
<value>Follow mouse cursor instead of focus when launching editor in a multi screen environment</value>
@ -308,9 +320,6 @@
<data name="FancyZones_ZoneHighlightColor.Text" xml:space="preserve">
<value>Zone highlight color (default: #0078D7)</value>
</data>
<data name="FancyZones_ZoneSetChangeFlashZonesCheckBoxControl.Content" xml:space="preserve">
<value>Flash zones when the active FancyZones layout changes</value>
</data>
<data name="FancyZones_ZoneSetChangeMoveWindows.Content" xml:space="preserve">
<value>During zone layout changes, windows assigned to a zone will match new size/positions</value>
</data>

View File

@ -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

View File

@ -81,13 +81,19 @@
IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled}"
/>
<CheckBox x:Uid="FancyZones_MouseDragCheckBoxControl_Header"
IsChecked="{ Binding Mode=TwoWay, Path=MouseSwitch}"
Margin="{StaticResource SmallTopMargin}"
IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled}"
/>
<CheckBox x:Uid="FancyZones_OverrideSnapHotkeysCheckBoxControl"
IsChecked="{ Binding Mode=TwoWay, Path=OverrideSnapHotkeys}"
Margin="{StaticResource SmallTopMargin}"
IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled}"/>
<CheckBox x:Uid="FancyZones_ZoneSetChangeFlashZonesCheckBoxControl"
IsChecked="{ Binding Mode=TwoWay, Path=ZoneSetChangeFlashZones}"
<CheckBox x:Uid="FancyZones_MoveVindowsAcrossAllMonitorsCheckBoxControl"
IsChecked="{ Binding Mode=TwoWay, Path=MoveWindowsAcrossMonitors}"
Margin="{StaticResource SmallTopMargin}"
IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled}"/>
@ -117,6 +123,16 @@
Margin="{StaticResource SmallTopMargin}"
IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled}"/>
<CheckBox x:Uid="FancyZones_ShowZonesOnAllMonitorsCheckBoxControl"
IsChecked="{ Binding Mode=TwoWay, Path=ShowOnAllMonitors}"
Margin="{StaticResource SmallTopMargin}"
IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled}"/>
<CheckBox x:Uid="FancyZones_MakeDraggedWindowTransparentCheckBoxControl"
IsChecked="{ Binding Mode=TwoWay, Path=MakeDraggedWindowsTransparent}"
Margin="{StaticResource SmallTopMargin}"
IsEnabled="{ Binding Mode=TwoWay, Path=IsEnabled}"/>
<TextBlock x:Uid="Appearancce_GroupSettings"
Style="{StaticResource SettingsGroupTitleStyle}"/>