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

[Peek] Use effective pixels for unsupported previewer #26345

Merged

Conversation

SamChaps
Copy link
Contributor

Summary of the Pull Request

Use effective pixels for unsupported previewer allowing to nicely display on any monitor scale.

PR Checklist

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.

@SamChaps SamChaps added Hot Fix Items we will product an out-of-band release for Product-Peek Refers to Peek Powertoys labels May 26, 2023
@SamChaps SamChaps changed the title Use effective pixels for unsupported previewer [Peek] Use effective pixels for unsupported previewer May 26, 2023
@donlaci
Copy link
Collaborator

donlaci commented May 26, 2023

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
image

@donlaci donlaci self-requested a review May 26, 2023 09:15
Copy link
Collaborator

@donlaci donlaci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take a look on the normal 100% scaling factor, the fonts are too small. Thanks

@SamChaps
Copy link
Contributor Author

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.

@SamChaps
Copy link
Contributor Author

Here is 100% at 1090x1080
image

Here is 100% at 2560x1440
image

@donlaci
Copy link
Collaborator

donlaci commented May 26, 2023

Hi Sam,
My monitor resolution is indeed 4k. It seems like as higher the resolution is as smaller the font size gets.

@SamChaps
Copy link
Contributor Author

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?

@donlaci
Copy link
Collaborator

donlaci commented May 26, 2023

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!

@SamChaps SamChaps merged commit 95a9a8a into main May 26, 2023
10 checks passed
@crutkas crutkas deleted the sachaple/peek-use-effective-pixels-unsupported-previewer branch June 1, 2023 03:48
BLM16 pushed a commit to BLM16/PowerToys that referenced this pull request Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hot Fix Items we will product an out-of-band release for Product-Peek Refers to Peek Powertoys
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants