[Settings] UX fixes (#45513)

## Summary of the Pull Request

This PR includes:
- UI improvements to the Mouse Without Borders settings page.
- UI improvements to the AOT settings page.
- Multiple small fixes (e.g. to enable proper disabled states)
- Using GH Copilot CLI to loc strings that were hardcoded.
- Using GH Copilot CLI to remove dead loc strings from `Resources.resw`
(@jay-o-way will appreciated this 😁):

<img width="606" height="245" alt="image"
src="https://github.com/user-attachments/assets/aeab1201-1129-4ac9-a714-ac5ea7a227cc"
/>


## PR Checklist

- [x] Closes: #41688
- [x] Closes: #32869
- [x] Closes: #36200

<!-- - [ ] Closes: #yyy (add separate lines for additional resolved
issues) -->
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **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

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

---------

Co-authored-by: Jiří Polášek <me@jiripolasek.com>
This commit is contained in:
Niels Laute
2026-02-11 23:00:11 +01:00
committed by GitHub
parent 2440f8fc23
commit 3385d1d741
17 changed files with 316 additions and 823 deletions

View File

@@ -134,9 +134,9 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
Settings.Properties.Hotkey.Value = _hotkey;
NotifyPropertyChanged();
// Also notify that transparency keys have changed
OnPropertyChanged(nameof(IncreaseOpacityKeysList));
OnPropertyChanged(nameof(DecreaseOpacityKeysList));
// Also notify that transparency shortcut strings have changed
OnPropertyChanged(nameof(IncreaseOpacityShortcut));
OnPropertyChanged(nameof(DecreaseOpacityShortcut));
// Using InvariantCulture as this is an IPC message
SendConfigMSG(
@@ -295,61 +295,31 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels
}
/// <summary>
/// Gets the keys list for increasing window opacity (modifier keys + "+").
/// Gets the formatted shortcut string for increasing window opacity (modifier keys + "+").
/// </summary>
public List<object> IncreaseOpacityKeysList
public string IncreaseOpacityShortcut
{
get
{
var keys = GetModifierKeysList();
keys.Add("+");
return keys;
var modifiers = new HotkeySettings(_hotkey.Win, _hotkey.Ctrl, _hotkey.Alt, _hotkey.Shift, 0).ToString();
var shortcut = string.IsNullOrEmpty(modifiers) ? "+" : modifiers + " + +";
return string.Format(CultureInfo.CurrentCulture, ResourceLoaderInstance.ResourceLoader.GetString("AlwaysOnTop_IncreaseOpacity"), shortcut);
}
}
/// <summary>
/// Gets the keys list for decreasing window opacity (modifier keys + "-").
/// Gets the formatted shortcut string for decreasing window opacity (modifier keys + "-").
/// </summary>
public List<object> DecreaseOpacityKeysList
public string DecreaseOpacityShortcut
{
get
{
var keys = GetModifierKeysList();
keys.Add("-");
return keys;
var modifiers = new HotkeySettings(_hotkey.Win, _hotkey.Ctrl, _hotkey.Alt, _hotkey.Shift, 0).ToString();
var shortcut = string.IsNullOrEmpty(modifiers) ? "-" : modifiers + " + -";
return string.Format(CultureInfo.CurrentCulture, ResourceLoaderInstance.ResourceLoader.GetString("AlwaysOnTop_DecreaseOpacity"), shortcut);
}
}
/// <summary>
/// Gets only the modifier keys from the current hotkey setting.
/// </summary>
private List<object> GetModifierKeysList()
{
var modifierKeys = new List<object>();
if (_hotkey.Win)
{
modifierKeys.Add(92); // The Windows key
}
if (_hotkey.Ctrl)
{
modifierKeys.Add("Ctrl");
}
if (_hotkey.Alt)
{
modifierKeys.Add("Alt");
}
if (_hotkey.Shift)
{
modifierKeys.Add(16); // The Shift key
}
return modifierKeys;
}
public void NotifyPropertyChanged([CallerMemberName] string propertyName = null)
{
OnPropertyChanged(propertyName);