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

[Windows] High DPI causes tkinter turtledemo windows blurry #119174

Closed
Wulian233 opened this issue May 19, 2024 · 0 comments
Closed

[Windows] High DPI causes tkinter turtledemo windows blurry #119174

Wulian233 opened this issue May 19, 2024 · 0 comments
Labels
type-feature A feature request or enhancement

Comments

@Wulian233
Copy link
Contributor

Wulian233 commented May 19, 2024

Feature or enhancement

Comparison

Here is a side by side comparison of both tkinter turtle-graphics examples windows, with and without the GUI fix. Maybe the screenshot was reduced by me so that the difference was not obvious, but actually before the text was also blurry. Also the sizes are different. Increasing pixel density while not changing the number of pixels will result in smaller window sizes.
IMG_20240519_180622

Solution

The solution is simple

Copy https://github.com/python/cpython/blob/main/Lib/idlelib/pyshell.py#L16-L22 to https://github.com/python/cpython/blob/main/Lib/turtledemo/__main__.py

See https://learn.microsoft.com/en-us/windows/win32/api/shellscalingapi/ne-shellscalingapi-process_dpi_awareness

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Linked PRs

@Wulian233 Wulian233 added the type-feature A feature request or enhancement label May 19, 2024
terryjreedy pushed a commit that referenced this issue May 21, 2024
…indows blurry (#119175)

------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 21, 2024
…les) windows blurry (pythonGH-119175)

------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 538ed5e)

Co-authored-by: Wulian233 <71213467+Wulian233@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this issue May 21, 2024
…les) windows blurry (pythonGH-119175)

------
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
(cherry picked from commit 538ed5e)

Co-authored-by: Wulian233 <71213467+Wulian233@users.noreply.github.com>
terryjreedy pushed a commit that referenced this issue May 21, 2024
…ples) windows blurry (GH-119175) (#119289)

gh-119174: Fix high DPI causes turtledemo(turtle-graphics examples) windows blurry (GH-119175)

------

(cherry picked from commit 538ed5e)

Co-authored-by: Wulian233 <71213467+Wulian233@users.noreply.github.com>
terryjreedy pushed a commit that referenced this issue May 21, 2024
…ples) windows blurry (GH-119175) (#119290)

gh-119174: Fix high DPI causes turtledemo(turtle-graphics examples) windows blurry (GH-119175)

------

(cherry picked from commit 538ed5e)

Co-authored-by: Wulian233 <71213467+Wulian233@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants