add Icon
This commit is contained in:
parent
88110c68f0
commit
193a05b4d5
@ -2,12 +2,18 @@ import pyotp, time
|
|||||||
import tkinter as tk
|
import tkinter as tk
|
||||||
from tkinter import simpledialog, messagebox
|
from tkinter import simpledialog, messagebox
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
|
import sys
|
||||||
import os
|
import os
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
|
|
||||||
email = os.getenv("ACCOUND")
|
email = os.getenv("ACCOUND")
|
||||||
seed = os.getenv("OTP_SEED")
|
seed = os.getenv("OTP_SEED")
|
||||||
|
|
||||||
|
def resource_path(filename):
|
||||||
|
if hasattr(sys, 'frozen'): # PyInstaller-EXE
|
||||||
|
return os.path.join(sys._MEIPASS, filename)
|
||||||
|
return os.path.join(os.path.dirname(__file__), filename)
|
||||||
|
|
||||||
def set_env_value(key, value, path=".env"):
|
def set_env_value(key, value, path=".env"):
|
||||||
lines = []
|
lines = []
|
||||||
found = False
|
found = False
|
||||||
@ -100,6 +106,6 @@ otp_menu.add_command(label="Beenden", command=root.destroy)
|
|||||||
menubar.add_cascade(label="Optionen", menu=otp_menu)
|
menubar.add_cascade(label="Optionen", menu=otp_menu)
|
||||||
|
|
||||||
|
|
||||||
|
root.iconbitmap(resource_path("otp-icon.ico"))
|
||||||
update()
|
update()
|
||||||
root.mainloop()
|
root.mainloop()
|
||||||
|
|||||||
BIN
otp-icon.ico
Normal file
BIN
otp-icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
BIN
otp-icon.png
Normal file
BIN
otp-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.2 KiB |
3
png2icon.py
Normal file
3
png2icon.py
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
from PIL import Image
|
||||||
|
img = Image.open("otp-icon.png")
|
||||||
|
img.save("otp-icon.ico")
|
||||||
Loading…
x
Reference in New Issue
Block a user