summaryrefslogtreecommitdiffstats
path: root/Lib/turtledemo/__main__.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-05-21 03:53:29 (GMT)
committerGitHub <noreply@github.com>2024-05-21 03:53:29 (GMT)
commitf7303cd96742cf6ae3dedc4e3d5211140922186f (patch)
tree38d69b657fd68923cd3c8bf041dc4a11d7b987f0 /Lib/turtledemo/__main__.py
parent24b0e8ddb4edc5402df3fc0e93a4e7824a94fee8 (diff)
downloadcpython-f7303cd96742cf6ae3dedc4e3d5211140922186f.zip
cpython-f7303cd96742cf6ae3dedc4e3d5211140922186f.tar.gz
cpython-f7303cd96742cf6ae3dedc4e3d5211140922186f.tar.bz2
[3.13] gh-119174: Fix high DPI causes turtledemo(turtle-graphics examples) windows blurry (GH-119175) (#119289)
gh-119174: Fix high DPI causes turtledemo(turtle-graphics examples) windows blurry (GH-119175) ------ (cherry picked from commit 538ed5e4818aa0d0aa759634e8bfa23e317434a1) Co-authored-by: Wulian233 <71213467+Wulian233@users.noreply.github.com>
Diffstat (limited to 'Lib/turtledemo/__main__.py')
-rwxr-xr-xLib/turtledemo/__main__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/turtledemo/__main__.py b/Lib/turtledemo/__main__.py
index 2ab6c15..731f98b 100755
--- a/Lib/turtledemo/__main__.py
+++ b/Lib/turtledemo/__main__.py
@@ -92,13 +92,15 @@ from tkinter import *
from idlelib.colorizer import ColorDelegator, color_config
from idlelib.percolator import Percolator
from idlelib.textview import view_text
+import turtle
from turtledemo import __doc__ as about_turtledemo
-import turtle
+if sys.platform == 'win32':
+ from idlelib.util import fix_win_hidpi
+ fix_win_hidpi()
demo_dir = os.path.dirname(os.path.abspath(__file__))
darwin = sys.platform == 'darwin'
-
STARTUP = 1
READY = 2
RUNNING = 3