mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-23 19:49:43 +01:00
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This pull request updates the tray icon context menu logic to better reflect the state of the "Quick Access" feature. The menu now dynamically updates its items and labels based on whether Quick Access is enabled or disabled, improving clarity for users. **Menu behavior improvements:** * The tray icon menu now reloads itself when the Quick Access setting changes, ensuring the menu always matches the current state. * The "Settings" menu item label changes to "Settings\tLeft-click" when Quick Access is disabled, providing clearer instructions to users. [[1]](diffhunk://#diff-e5efbda4c356e159a6ca82a425db84438ab4014d1d90377b98a2eb6d9632d32dR176-R179) [[2]](diffhunk://#diff-7139ecb2cf76e472c574a155268c19e919e2cce05d9d345c50c1f1bffc939e1aR198-R248) * The Quick Access menu item is removed from the context menu when the feature is disabled, preventing confusion. **Internal state tracking:** * Added a new variable `last_quick_access_state` to track the previous Quick Access state and trigger menu reloads only when necessary. <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist - [x] Closes: #44810 <!-- - [ ] Closes: #yyy (add separate lines for additional resolved issues) --> - [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 <!-- 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 - When Quick Access is disabled <img width="1537" height="312" alt="image" src="https://github.com/user-attachments/assets/5d51f24e-ccb4-4973-afaa-8b64cc35db87" /> - When Quick Access is enabled <img width="1601" height="201" alt="image" src="https://github.com/user-attachments/assets/56366d10-bcec-4892-b2d2-f8213ad726aa" /> <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed