Fixed high DPI issue

This commit is contained in:
Evan Su 2021-03-13 12:27:03 -05:00 committed by GitHub
parent e3216da69b
commit bf29277b92
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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")