PowerToys
PowerToys copied to clipboard
[Peek] Use effective pixels for unsupported previewer
Summary of the Pull Request
Use effective pixels for unsupported previewer allowing to nicely display on any monitor scale.
PR Checklist
- [ ] Closes: #26133
- [ ] 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
- Added PreviewSize class to support effective pixels for previewers.
- Refactored monitor size evaluation based on scale.
Validation Steps Performed
Tested on different monitor scale.
Hi Sam, Just checked your fix. It solves the problem with big scales. On my screen when checking the normal 100% scaling factor, the font sizes got smaller, maybe too small.
Could you take a look on that?
Thanks!
Laszlo
Please take a look on the normal 100% scaling factor, the fonts are too small. Thanks
What is your monitor resolution? I have a 2k monitor and it looks good at 100% If your monitor is 4k and you use 100% I would expect the text to be very small just like the rest of Windows text. Text scaling should happen automatically with XAML, I don't think manually changing the font size is a viable option.
Here is 100% at 1090x1080
Here is 100% at 2560x1440
Hi Sam, My monitor resolution is indeed 4k. It seems like as higher the resolution is as smaller the font size gets.
Hi Sam, My monitor resolution is indeed 4k. It seems like as higher the resolution is as smaller the font size gets.
Do you notice similar behavior with other apps or Peek's behavior is different?
It was with peek only. With the new commit the preview of unsupported files looks great with any scale factor. 100%, 250%. Well done, great!