Created
November 10, 2019 11:51
-
-
Save tomekzaw/7639cd35a87166a39bfc6f42a691d11a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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