8000 gh-119459: Fix HiDPI blurring of every program window that using tkinter by Wulian233 · Pull Request #119902 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-119459: Fix HiDPI blurring of every program window that using tkinter #119902

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

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
finish
  • Loading branch information
Wulian233 authored Jun 2, 2024
commit ba34aa5d11f3fa00133011990bdb589e821191bd
4 changes: 0 additions & 4 deletions Lib/tkinter/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2474,10 +2474,6 @@ def __init__(self, screenName=None, baseName=None, className='Tk',
# >= win 8.1
PROCESS_SYSTEM_DPI_AWARE: int = 1 # Int required
ctypes.windll.shcore.SetProcessDpiAwareness(PROCESS_SYSTEM_DPI_AWARE)
# Ensures that the window size is not reduced due to DPI adjustments,
# maintaining the original size
ScaleFactor = ctypes.windll.shcore.GetScaleFactorForDevice(0)
self.tk.call('tk', 'scaling', ScaleFactor/75)
except (ImportError, AttributeError, OSError):
try:
# win 8.0 or less
Expand Down
0