mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
bpo-33656: On Windows, add API call saying that tk scales for DPI (GH-7137)
On Windows 8.1+ or 10, with DPI compatibility properties of the Python binary unchanged, and a monitor resolution greater than 96 DPI, this should make text and lines sharper. It should otherwise have no effect. Using a magnifier, I determined that the improvement comes from horizontal and lines being better lined up with the monitor pixels. I checked that this call causes no problem on any Windows buildbot, including the Win7 buildbots. Unlike most IDLE patches, this one can be easily reverted by users by removing a few lines, at the top of idlelib/pyshell.py.
This commit is contained in:
parent
0e5f901508
commit
800415e3df
5 changed files with 30 additions and 3 deletions
|
|
@ -373,11 +373,12 @@ class ConfigDialog(Toplevel):
|
|||
).grid(row=row, column=1, sticky=W, padx=7)
|
||||
elif opt['type'] == 'int':
|
||||
Entry(entry_area, textvariable=var, validate='key',
|
||||
validatecommand=(self.is_int, '%P')
|
||||
validatecommand=(self.is_int, '%P'), width=10
|
||||
).grid(row=row, column=1, sticky=NSEW, padx=7)
|
||||
|
||||
else:
|
||||
Entry(entry_area, textvariable=var
|
||||
else: # type == 'str'
|
||||
# Limit size to fit non-expanding space with larger font.
|
||||
Entry(entry_area, textvariable=var, width=15
|
||||
).grid(row=row, column=1, sticky=NSEW, padx=7)
|
||||
return
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue