Skip to content

Commit

Permalink
fixed ui buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNupurC committed Jul 7, 2022
1 parent 5d4d474 commit bbbb7e6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def text(content,size,x,y):
title = Label(window_name,text=content,font=("Arial",size,"bold"),fg=primary_color,bg=background_color) # addes a text widget
title.place(relx=x,rely=y,anchor = CENTER) # places the text widget in place

def button(task,content,size,x,y,width):
def button(task,content,size,x,y,width=5):
signup_button = Button(window_name,command=task,text=content,font=("Comic Sans",size,"bold"),bg=gray,fg=primary_color,activeforeground=primary_color,activebackground=background_color,borderwidth=0,width = width) # addes a button widget
signup_button.place(relx=x,rely=y,anchor = CENTER) # places the button widget in place
class Window:
Expand Down Expand Up @@ -69,7 +69,7 @@ def enter_button():
operations.destroy_window() # destroys the signup window
Window.home() # navigates back to home

operations.button(get_path,"Browse",15,0.68,0.7) # adds browse button
operations.button(get_path,"Browse",15,0.68,0.7,7) # adds browse button
#IF BACK BUTTON PRESSED
operations.button(lambda:[operations.destroy_window(),Window.home()],"Back",15,0.2,0.2)
operations.button(enter_button,"Enter",20,0.5,0.8) # adds enter button
Expand Down Expand Up @@ -113,8 +113,8 @@ def logout():
# IF LOGOUT BUTTON IS PRESSES
operations.button(logout,"logout",15,0.8,0.1) # adds logout button

operations.button(Window.addpass,"Add a new password",15,0.5,0.3) # adds , add a new password button
operations.button(Window.viewsite,"View all passwords",15,0.5,0.4) # adds view password button
operations.button(Window.addpass,"Add a new password",15,0.5,0.3,20) # adds , add a new password button
operations.button(Window.viewsite,"View all passwords",15,0.5,0.4,20) # adds view password button

def addpass():
operations.destroy_window() # destroys the user window
Expand Down
1 change: 1 addition & 0 deletions usr/usrFile.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

0 comments on commit bbbb7e6

Please sign in to comment.