diff --git a/ProperTree.py b/ProperTree.py index 134131cb..11607db7 100755 --- a/ProperTree.py +++ b/ProperTree.py @@ -79,6 +79,12 @@ def __init__(self, plists = []): self.queue = multiprocessing.Queue() self.tex_queue = multiprocessing.Queue() self.creating_window = False + # HiDPI fix for Windows + if os.name == "nt": + try: # >= win 8.1 + ctypes.windll.shcore.SetProcessDpiAwareness(2) + except: # win 8.0 or less + ctypes.windll.user32.SetProcessDPIAware() # Create the new tk object self.tk = tk.Tk() self.tk.withdraw() # Try to remove before it's drawn diff --git a/Scripts/config_tex_info.py b/Scripts/config_tex_info.py index 5218fb19..f2548f2b 100644 --- a/Scripts/config_tex_info.py +++ b/Scripts/config_tex_info.py @@ -109,12 +109,6 @@ def set(self, low, high): # Madness to get the titlebar height offset_y = 0 - if os.name == "nt": - import ctypes - try: # >= win 8.1 - ctypes.windll.shcore.SetProcessDpiAwareness(2) - except: # win 8.0 or less - ctypes.windll.user32.SetProcessDPIAware() offset_y = int(info_window.geometry().rsplit('+', 1)[-1]) bar_height = info_window.winfo_rooty() - offset_y