Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Screen Ruler]New feature for screen ruler, showing the measurement in an extra unit #35887

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

Sophanatprime
Copy link

@Sophanatprime Sophanatprime commented Nov 12, 2024

Summary of the Pull Request

  • Project: common/Display. Add a method to get the size of a monitor. Add methods to get MonitorInfo from a window or point. Needed for MeasureTool.
  • Project MeasureTool. Besides showing the value in pixels, now we can also show the value in another unit, including inch, centimeter, and millimeter. Also, a setting property is added for this.

PR Checklist

  • Closes: A suggestion for improving the display ruler - metric units #27394
  • 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. I did not see the doc of MeasureTool. Maybe no need for this project?
  • 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

To convert from pixels to millimeters correctly, we need to get the physical size in pixels and the real size in millimeters of a monitor and save the ratio for later use.

Update images for the new this new feature.

Validation Steps Performed

Testing by hands, literally. Use a real ruler to measure the colored line shown on the screen, and compare it to the measurement value.

This comment has been minimized.

@Sophanatprime
Copy link
Author

@microsoft-github-policy-service agree

@Sophanatprime Sophanatprime marked this pull request as ready for review November 12, 2024 08:26
@Sophanatprime Sophanatprime changed the title New feature for screen ruler, showing the measurement in another unit [Screen Ruler]New feature for screen ruler, showing the measurement in an extra unit Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant