[Screen Ruler]New feature for screen ruler, showing the measurement in an extra unit #35887
+264
−96
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
common/Display
. Add a method to get the size of a monitor. Add methods to getMonitorInfo
from a window or point. Needed forMeasureTool
.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
MeasureTool
. Maybe no need for this project?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.