Fix some interface elements
This commit is contained in:
parent
9f60e69139
commit
a0008982e8
19
front.py
19
front.py
@ -11,6 +11,7 @@ window.resizable(width=False, height=False)
|
|||||||
window.configure(background="#ccc")
|
window.configure(background="#ccc")
|
||||||
ttk.Style().configure("TCheckbutton", padding=6, relief="flat",
|
ttk.Style().configure("TCheckbutton", padding=6, relief="flat",
|
||||||
background="#ccc")
|
background="#ccc")
|
||||||
|
ttk.Style().configure("TEntry", relief="flat")
|
||||||
window.title("Passgen by anqude")
|
window.title("Passgen by anqude")
|
||||||
window.tk.call('wm', 'iconphoto', window._w, PhotoImage(file='./icon.png'))
|
window.tk.call('wm', 'iconphoto', window._w, PhotoImage(file='./icon.png'))
|
||||||
ttk.Style().configure("TButton", padding=6, relief="flat",
|
ttk.Style().configure("TButton", padding=6, relief="flat",
|
||||||
@ -34,7 +35,7 @@ def copy_click(event):
|
|||||||
def handle_click(event):
|
def handle_click(event):
|
||||||
entry.delete(0, END)
|
entry.delete(0, END)
|
||||||
try:
|
try:
|
||||||
password=pass_generate(Checkvariables(),counter)
|
password=pass_generate(Checkvariables(),int(label2.get()))
|
||||||
entry.insert(0, password)
|
entry.insert(0, password)
|
||||||
except:
|
except:
|
||||||
entry.insert(0, "")
|
entry.insert(0, "")
|
||||||
@ -45,15 +46,19 @@ def genadiy(event):
|
|||||||
|
|
||||||
def plus_click(event):
|
def plus_click(event):
|
||||||
global counter
|
global counter
|
||||||
|
counter=int(label2.get())
|
||||||
counter+=1
|
counter+=1
|
||||||
label2.config(text=counter)
|
label2.delete(0, END)
|
||||||
|
label2.insert(0, counter)
|
||||||
def minus_click(event):
|
def minus_click(event):
|
||||||
global counter
|
global counter
|
||||||
|
counter=int(label2.get())
|
||||||
if counter==1:
|
if counter==1:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
counter-=1
|
counter-=1
|
||||||
label2.config(text=counter)
|
label2.delete(0, END)
|
||||||
|
label2.insert(0, counter)
|
||||||
def Checkvariables():
|
def Checkvariables():
|
||||||
|
|
||||||
password_lst=alph_generate(Chnumber.get(),ChletterB.get(),ChletterS.get(),Chspec.get())
|
password_lst=alph_generate(Chnumber.get(),ChletterB.get(),ChletterS.get(),Chspec.get())
|
||||||
@ -67,7 +72,7 @@ Chnumber = IntVar()
|
|||||||
button.bind("<Button-1>", handle_click)
|
button.bind("<Button-1>", handle_click)
|
||||||
genqr.bind("<Button-1>", genadiy)
|
genqr.bind("<Button-1>", genadiy)
|
||||||
|
|
||||||
entry = Entry(width = 40)
|
entry = ttk.Entry(width = 40)
|
||||||
CheckCpec = Checkbutton(text='Special',variable=Chspec, onvalue=True, offvalue=False, command=Checkvariables,background='#ccc')
|
CheckCpec = Checkbutton(text='Special',variable=Chspec, onvalue=True, offvalue=False, command=Checkvariables,background='#ccc')
|
||||||
CheckLetterB = Checkbutton(text='LETTERS',variable=ChletterB, onvalue=True, offvalue=False, command=Checkvariables,background='#ccc')
|
CheckLetterB = Checkbutton(text='LETTERS',variable=ChletterB, onvalue=True, offvalue=False, command=Checkvariables,background='#ccc')
|
||||||
CheckLetterS = Checkbutton(text='Letters',variable=ChletterS, onvalue=True, offvalue=False, command=Checkvariables,background='#ccc')
|
CheckLetterS = Checkbutton(text='Letters',variable=ChletterS, onvalue=True, offvalue=False, command=Checkvariables,background='#ccc')
|
||||||
@ -80,8 +85,8 @@ minus = ttk.Button(text="-")
|
|||||||
minus.bind("<Button-1>", minus_click)
|
minus.bind("<Button-1>", minus_click)
|
||||||
Copy = ttk.Button(text="Copy!",width = 39)
|
Copy = ttk.Button(text="Copy!",width = 39)
|
||||||
Copy.bind("<Button-1>", copy_click)
|
Copy.bind("<Button-1>", copy_click)
|
||||||
label2 = Label(text=counter)
|
label2 = ttk.Entry(width = 4)
|
||||||
label2.configure(background="#ccc")
|
label2.insert(0, counter)
|
||||||
|
|
||||||
label.pack(anchor="nw")
|
label.pack(anchor="nw")
|
||||||
|
|
||||||
@ -93,7 +98,7 @@ CheckCpec.place(x=12, y=110)
|
|||||||
CheckLetterB.place(x=92, y=110)
|
CheckLetterB.place(x=92, y=110)
|
||||||
CheckLetterS.place(x=182, y=110)
|
CheckLetterS.place(x=182, y=110)
|
||||||
CheckNumber.place(x=262, y=110)
|
CheckNumber.place(x=262, y=110)
|
||||||
label2.place(x=172, y=150)
|
label2.place(x=157, y=150)
|
||||||
minus.place(x=12, y=140)
|
minus.place(x=12, y=140)
|
||||||
plus.place(x=252, y=140)
|
plus.place(x=252, y=140)
|
||||||
Copy.place(x=12, y=190)
|
Copy.place(x=12, y=190)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user