mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-19 04:59:40 +01:00
add horizontal and vertical options for MousePointerCrosshairs (#41789)
## Summary of the Pull Request This PR addresses two logged issues for MousePointerCrosshairs, these are: https://github.com/microsoft/PowerToys/issues/24944 https://github.com/microsoft/PowerToys/issues/31817 ## PR Checklist - [x] Closes: #24944, #31817 - [x] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [x] **Tests:** Added/updated and all pass - [x] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments The PR adds a new combo box to MousePointerCrosshairs XAML options, this gives the option for 'both', 'vertical only' or 'horizontal only'. The default option is 'both' which mirrors the existing behavior. ## Validation Steps Performed Validation has been completed on two separate PCs, a Surface laptop 7 Pro and a Dell Workstation. --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -100,6 +100,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
_mousePointerCrosshairsAutoHide = MousePointerCrosshairsSettingsConfig.Properties.CrosshairsAutoHide.Value;
|
||||
_mousePointerCrosshairsIsFixedLengthEnabled = MousePointerCrosshairsSettingsConfig.Properties.CrosshairsIsFixedLengthEnabled.Value;
|
||||
_mousePointerCrosshairsFixedLength = MousePointerCrosshairsSettingsConfig.Properties.CrosshairsFixedLength.Value;
|
||||
_mousePointerCrosshairsOrientation = MousePointerCrosshairsSettingsConfig.Properties.CrosshairsOrientation.Value;
|
||||
_mousePointerCrosshairsAutoActivate = MousePointerCrosshairsSettingsConfig.Properties.AutoActivate.Value;
|
||||
|
||||
int isEnabled = 0;
|
||||
@@ -869,6 +870,24 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
}
|
||||
}
|
||||
|
||||
public int MousePointerCrosshairsOrientation
|
||||
{
|
||||
get
|
||||
{
|
||||
return _mousePointerCrosshairsOrientation;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
if (value != _mousePointerCrosshairsOrientation)
|
||||
{
|
||||
_mousePointerCrosshairsOrientation = value;
|
||||
MousePointerCrosshairsSettingsConfig.Properties.CrosshairsOrientation.Value = value;
|
||||
NotifyMousePointerCrosshairsPropertyChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool MousePointerCrosshairsAutoActivate
|
||||
{
|
||||
get
|
||||
@@ -991,6 +1010,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
|
||||
private bool _mousePointerCrosshairsAutoHide;
|
||||
private bool _mousePointerCrosshairsIsFixedLengthEnabled;
|
||||
private int _mousePointerCrosshairsFixedLength;
|
||||
private int _mousePointerCrosshairsOrientation;
|
||||
private bool _mousePointerCrosshairsAutoActivate;
|
||||
private bool _isAnimationEnabledBySystem;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user