Skip to content

Instantly share code, notes, and snippets.

@tomekzaw
Created November 10, 2019 11:51
Show Gist options
  • Save tomekzaw/7639cd35a87166a39bfc6f42a691d11a to your computer and use it in GitHub Desktop.
Save tomekzaw/7639cd35a87166a39bfc6f42a691d11a to your computer and use it in GitHub Desktop.
def fix_scaling():
import sys
if sys.platform == 'win32':
try:
import ctypes
PROCESS_SYSTEM_DPI_AWARE = 1
ctypes.OleDLL('shcore').SetProcessDpiAwareness(PROCESS_SYSTEM_DPI_AWARE)
except (ImportError, AttributeError, OSError):
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment