From bf29277b9248870cd6767f825fcee48fe8d4e98d Mon Sep 17 00:00:00 2001 From: Evan Su <48808396+HACKERALERT@users.noreply.github.com> Date: Sat, 13 Mar 2021 12:27:03 -0500 Subject: [PATCH] Fixed high DPI issue --- src/Picocrypt.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Picocrypt.py b/src/Picocrypt.py index ea26d88..411db40 100644 --- a/src/Picocrypt.py +++ b/src/Picocrypt.py @@ -66,6 +66,12 @@ 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")