From 37d6bfdc682371fe482e4bd7d4eb45cd85056918 Mon Sep 17 00:00:00 2001 From: Evan Su <48808396+HACKERALERT@users.noreply.github.com> Date: Sat, 13 Mar 2021 12:56:27 -0500 Subject: [PATCH] Update DPI settings --- src/Picocrypt.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/Picocrypt.py b/src/Picocrypt.py index 411db40..493d511 100644 --- a/src/Picocrypt.py +++ b/src/Picocrypt.py @@ -32,10 +32,11 @@ import tkinter.ttk import tkinter.scrolledtext import webbrowser -# Set high DPI on Windows +# Tk/Tcl is a little barbaric, disable +# high DPI so it doesn't look really ugly try: from ctypes import windll - windll.shcore.SetProcessDpiAwareness(1) + windll.shcore.SetProcessDpiAwareness(0) except: pass @@ -60,18 +61,11 @@ unknownErrorNotice = "Unknown error occured. Please try again." # Create root Tk tk = tkinter.Tk() -#tk.tk.call('tk', 'scaling', 2.0) tk.geometry("480x420") tk.title("Picocrypt") tk.configure(background="#f5f6f7") tk.resizable(0,0) -try: - dpi = windll.user32.GetDpiForWindow(tk.winfo_id()) - tk.tk.call("tk","scaling",dpi/72.0) -except: - pass - # Try setting image if included with Picocrypt try: favicon = tkinter.PhotoImage(file="./key.png")