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

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

Merged
merged 7 commits into from
May 21, 2024

Conversation

Wulian233
Copy link
Contributor

@Wulian233 Wulian233 commented May 19, 2024

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

if win32:
    try:
        import ctypes
        PROCESS_SYSTEM_DPI_AWARE = 1  # Int required.
        ctypes.OleDLL('shcore').SetProcessDpiAwareness(PROCESS_SYSTEM_DPI_AWARE)
    except (ImportError, AttributeError, OSError):
        pass

Copy link

cpython-cla-bot bot commented May 19, 2024

All commit authors signed the Contributor License Agreement.
CLA signed

@Wulian233 Wulian233 changed the title Fix high DPI causes turtledemo(turtle-graphics examples) windows blurry gh-119174: Fix high DPI causes turtledemo(turtle-graphics examples) windows blurry May 19, 2024
Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
@terryjreedy
Copy link
Member

Lint failed because news item needed newline. I should have replaced default "Update ..." message as change is not visible in diffs.

I will make unrelated config.py correction in a separate PR.

I will change this to move fixup code to a new function in idlelib.util and then conditionally import and call function.

@terryjreedy
Copy link
Member

Wait for now.

@python python deleted a comment from bedevere-app bot May 20, 2024
@terryjreedy terryjreedy added needs backport to 3.12 bug and security fixes needs backport to 3.13 bugs and security fixes labels May 20, 2024
@terryjreedy
Copy link
Member

Ignore change request; I made all changes I think are needed. After separate config patch, I had to fix merge conflict and decided to make additional change here. Please pull changes to your system and test that revised code works.

@Wulian233
Copy link
Contributor Author

Thanks! Look Good To Me! 😀

@terryjreedy terryjreedy merged commit 538ed5e into python:main May 21, 2024
34 of 37 checks passed
@miss-islington-app
Copy link

Thanks @Wulian233 for the PR, and @terryjreedy for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request 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 pull request 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>
@bedevere-app
Copy link

bedevere-app bot commented May 21, 2024

GH-119289 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label May 21, 2024
@bedevere-app
Copy link

bedevere-app bot commented May 21, 2024

GH-119290 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 bug and security fixes label May 21, 2024
terryjreedy pushed a commit that referenced this pull request 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 pull request 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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants