PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

[ScreenRuler] Multiple measurements for measuring tools

Open drawbyperpetual opened this issue 1 year ago • 1 comments

Summary of the Pull Request

  • Adds support for multiple measurements for measuring tools.
  • Changes clipboard handling for Bounds tool to be in sync with measuring tools enhancements.

PR Checklist

  • [X] Closes: #22825
  • [X] Communication: I've discussed this with core contributors already. If 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
  • [ ] Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Demo: screen_ruler_measurements_multiple

  • Holding the SHIFT key while releasing the primary mouse button keeps the current measurement displayed instead of hiding it.
  • Clipboard handling: all active measurements are copied to the clipboard when there are multiple measurements. Bounds tool also made to work this way.

Validation Steps Performed

  • Tested existing functionality as described here
  • Tested new functionality - multiple measurements / bounds by holding SHIFT key and releasing or hitting ESC. Some multiple measurements were made on multiple monitors.

drawbyperpetual avatar Jun 25 '24 00:06 drawbyperpetual

Gave it a quick test. I think the Bounds measure behaves a bit weirdly. When you press shift and take measurements and then you release shift and try to take more measurements, those don't stick but stay in the same mode 🤔 Not sure this makes sense as user interaction.

Other than clipboard handling, the Bounds tool hasn't been changed - only the measuring tools have, so the behavior you mention is an existing one. Having said that, I think it's actually quite logical - the heuristic is "Hold SHIFT to keep this box, otherwise forget it."

drawbyperpetual avatar Jun 26 '24 22:06 drawbyperpetual

@jaimecbernardo @drawbyperpetual Hello there. The functionality has changed since the repo has been updated quite a lot. Now, when we release the Shift key nothing happens and the bounding boxes still appear normally. E.g. -

multipleMeasureDemo

In the above demo, after the first 4 bounding boxes, I released my Shift key and pressed it again for the second set of 4s at the bottom of the screen. Everything was working fine.

GhostVaibhav avatar Aug 08 '24 17:08 GhostVaibhav

@GhostVaibhav : With the exception of clipboard behaviour, the intention of this change isn't to change the bounds tool - it's to make the measuring tools more like the bounds tool with respect to multiple measurements. Am I right to say from your comment that the measuring tool is working as you expect?

drawbyperpetual avatar Aug 13 '24 11:08 drawbyperpetual

@drawbyperpetual Yes, it is working at par like the other utilities 👍🏻

GhostVaibhav avatar Aug 13 '24 15:08 GhostVaibhav