@@ -389,22 +389,33 @@ def hide_tooltip(event):
389389 cli = 'soon' # CLI mode will be added soon...
390390else :
391391 root = Tk ()
392- root .geometry ('750x910 ' )
392+ root .geometry ('701x507 ' )
393393 root .resizable (True , True )
394394 root .iconbitmap ('resources/icons/icon.ico' )
395395 root .title ('PySilon Builder' )
396396 root .configure (bg = '#0A0A10' )
397397 root .tk_setPalette (background = '#0A0A10' , foreground = 'white' , activeBackground = '#0A0A10' , activeForeground = 'white' )
398398
399- my_canvas = Canvas (root , width = 1 , height = 1 , bd = 0 )
399+ main_frame = Frame (root , bg = '#0A0A10' )
400+ main_frame .pack (fill = BOTH , expand = YES )
401+ canvas = Canvas (main_frame , bg = '#0A0A10' )
402+ canvas .pack (side = LEFT , fill = BOTH , expand = YES )
403+ scrollbar = Scrollbar (main_frame , command = canvas .yview , bg = '#0A0A10' , troughcolor = '#0A0A10' )
404+ scrollbar .pack (side = RIGHT , fill = Y )
405+ canvas .configure (yscrollcommand = scrollbar .set )
406+ canvas .bind ('<Configure>' , lambda e : canvas .configure (scrollregion = canvas .bbox ("all" )))
407+ frame = Frame (canvas , bg = '#0A0A10' )
408+ canvas .create_window ((0 , 0 ), window = frame , anchor = "nw" )
409+
410+ my_canvas = Canvas (frame , width = 1 , height = 1 , bd = 0 )
400411 Button (my_canvas , text = 'Load configuration' , command = lambda :load_configuration (False )).grid (row = 1 , column = 1 , padx = (10 , 0 ), pady = 10 )
401412 Button (my_canvas , text = 'Load custom...' , command = lambda :load_configuration (True )).grid (row = 1 , column = 2 , padx = (10 , 0 ), pady = 10 )
402413 Button (my_canvas , text = 'Load recommended' , command = recommended_configuration ).grid (row = 1 , column = 3 , padx = (10 , 0 ), pady = 10 )
403414 Button (my_canvas , text = 'Reset' , command = reset_configuration ).grid (row = 1 , column = 4 , padx = (10 , 0 ), pady = 10 )
404415 Button (my_canvas , text = 'Save' , command = save_configuration ).grid (row = 1 , column = 5 , padx = (10 , 0 ), pady = 10 )
405416 my_canvas .pack (anchor = NW )
406417
407- settings_canvas = Canvas (root , width = 1 , height = 1 , bd = 0 )
418+ settings_canvas = Canvas (frame , width = 1 , height = 1 , bd = 0 )
408419 cbvar_custom_icon = BooleanVar (value = True )
409420 Label (settings_canvas , text = 'General settings:' , justify = RIGHT , anchor = E ).grid (row = 2 , padx = (30 , 5 ), pady = (30 , 2 ), sticky = E )
410421 Label (settings_canvas , text = 'Server ID*:' , justify = RIGHT , anchor = E ).grid (row = 3 , padx = (30 , 5 ), pady = 2 , sticky = E )
@@ -422,7 +433,7 @@ def hide_tooltip(event):
422433
423434 debug_mode_btn = Button (settings_canvas , text = 'Debug mode [OFF]' , fg = 'gray' , state = NORMAL , width = 12 , height = 1 , command = debug_toggle )
424435 debug_mode_btn .grid (row = 15 , column = 1 , padx = (5 , 5 ), pady = 10 , sticky = NSEW , rowspan = 2 )
425- tooltip_label = Label (root , text = "Note: Debug mode should only be used for development or testing!" , relief = RIDGE , borderwidth = 2 , background = "#0A0A10" )
436+ tooltip_label = Label (frame , text = "Note: Debug mode should only be used for development or testing!" , relief = RIDGE , borderwidth = 2 , background = "#0A0A10" )
426437 debug_mode_btn .bind ("<Enter>" , show_tooltip )
427438 debug_mode_btn .bind ("<Leave>" , hide_tooltip )
428439
@@ -551,18 +562,20 @@ def open_crypto_clipper_config():
551562 cb_crclipr .grid (row = 29 , column = 2 , sticky = W , padx = (30 , 0 ), pady = (0 , 15 ))
552563 json_button .grid (row = 29 , column = 2 , padx = (190 , 0 ), pady = (0 , 15 ))
553564
554- bottom_buttons = Canvas (root , width = 1 , height = 1 , bd = 0 )
565+ bottom_buttons = Canvas (frame , width = 1 , height = 1 , bd = 0 )
555566 cbvar_disclaimer = BooleanVar (value = False )
556567 cb_disclaimer = Checkbutton (bottom_buttons , selectcolor = '#0A0A10' , text = ' I\' m aware that this malware has been made for educational purposes only, and the creator is no way responsible\n for any direct or indirect damage caused due to the misusage of the information. Everything I do, I\' m doing at\n my own risk and responsibility.' , variable = cbvar_disclaimer , command = disclaimer_toggle , onvalue = True , offvalue = False , justify = LEFT , anchor = W )
557568 cb_disclaimer .grid (row = 1 )
558569 bottom_buttons .pack (pady = (20 , 0 ))
559570
560- bottom_buttons = Canvas (root , width = 1 , height = 1 , bd = 0 )
571+ bottom_buttons = Canvas (frame , width = 1 , height = 1 , bd = 0 )
561572 generate_source_btn = Button (bottom_buttons , text = 'Generate source' , state = DISABLED , command = assemble_source_code )
562573 generate_source_btn .grid (row = 1 , column = 1 , padx = (10 , 0 ), pady = 10 )
563574 compile_btn = Button (bottom_buttons , text = 'Compile' , state = DISABLED , command = compile_source )
564575 compile_btn .grid (row = 1 , column = 2 , padx = 10 , pady = 10 )
565576 bottom_buttons .pack (anchor = E , side = 'bottom' )
566577
567578 server_id .focus_set ()
568- root .mainloop ()
579+ root .update ()
580+ canvas .config (scrollregion = canvas .bbox ("all" ))
581+ root .mainloop ()
0 commit comments