[ScreenRuler] Multiple measurements for measuring tools
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
- [ ] JSON for signing for new binaries
- [ ] WXS for installer for new binaries and localization folder
- [ ] YML for CI pipeline for new test projects
- [ ] YML for signed pipeline
- [ ] 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:
- 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.
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."
@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. -
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 : 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 Yes, it is working at par like the other utilities 👍🏻