Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Lib/idlelib/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def __init__(self, _utest=False):
self.userCfg = {}
self.cfg = {} # TODO use to select userCfg vs defaultCfg
# self.blink_off_time = <first editor text>['insertofftime']
# See https:/bugs.python.org/issue4630, msg356516.
# See https://bugs.python.org/issue4630#msg356516

if not _utest:
self.CreateConfigHandlers()
Expand Down
10 changes: 10 additions & 0 deletions Lib/turtledemo/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@

demo_dir = os.path.dirname(os.path.abspath(__file__))
darwin = sys.platform == 'darwin'
win32 = sys.platform == 'win32'

STARTUP = 1
READY = 2
Expand Down Expand Up @@ -131,6 +132,15 @@ def __init__(self, filename=None):
root.title('Python turtle-graphics examples')
root.wm_protocol("WM_DELETE_WINDOW", self._destroy)

# See https://learn.microsoft.com/en-us/windows/win32/api/shellscalingapi/ne-shellscalingapi-process_dpi_awareness
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

if darwin:
import subprocess
# Make sure we are the currently activated OS X application
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix high DPI causes turtledemo(turtle-graphics examples) windows blurry
Patch by Wulian233