@@ -90,6 +90,11 @@ def __init__(self, root):
9090 self .create_widgets ()
9191
9292 def create_widgets (self ):
93+ # Configure ttk styles for cross-platform button appearance
94+ style = ttk .Style ()
95+ style .configure ("Blue.TButton" , font = ("Arial" , 10 ), padding = (12 , 5 ))
96+ style .configure ("Green.TButton" , font = ("Arial" , 14 , "bold" ), padding = (30 , 12 ))
97+
9398 # Header
9499 header = tk .Frame (self .root , bg = "#2C5F87" , height = 80 )
95100 header .pack (fill = tk .X )
@@ -112,28 +117,19 @@ def create_widgets(self):
112117 btn_container = tk .Frame (new_budget_frame )
113118 btn_container .pack ()
114119
115- btn_3yr = tk .Button (btn_container , text = "New 3-Year Budget" ,
116- command = lambda : self .create_new_budget (3 ),
117- font = ("Arial" , 10 ), bg = "#2C5F87" , fg = "white" ,
118- activebackground = "#1E4A6E" , activeforeground = "white" ,
119- highlightbackground = "#2C5F87" ,
120- padx = 12 , pady = 5 , cursor = "hand2" )
120+ btn_3yr = ttk .Button (btn_container , text = "New 3-Year Budget" ,
121+ command = lambda : self .create_new_budget (3 ),
122+ style = "Blue.TButton" )
121123 btn_3yr .pack (side = tk .LEFT , padx = 5 )
122124
123- btn_5yr = tk .Button (btn_container , text = "New 5-Year Budget" ,
124- command = lambda : self .create_new_budget (5 ),
125- font = ("Arial" , 10 ), bg = "#2C5F87" , fg = "white" ,
126- activebackground = "#1E4A6E" , activeforeground = "white" ,
127- highlightbackground = "#2C5F87" ,
128- padx = 12 , pady = 5 , cursor = "hand2" )
125+ btn_5yr = ttk .Button (btn_container , text = "New 5-Year Budget" ,
126+ command = lambda : self .create_new_budget (5 ),
127+ style = "Blue.TButton" )
129128 btn_5yr .pack (side = tk .LEFT , padx = 5 )
130129
131- btn_10yr = tk .Button (btn_container , text = "New 10-Year Budget" ,
132- command = lambda : self .create_new_budget (10 ),
133- font = ("Arial" , 10 ), bg = "#2C5F87" , fg = "white" ,
134- activebackground = "#1E4A6E" , activeforeground = "white" ,
135- highlightbackground = "#2C5F87" ,
136- padx = 12 , pady = 5 , cursor = "hand2" )
130+ btn_10yr = ttk .Button (btn_container , text = "New 10-Year Budget" ,
131+ command = lambda : self .create_new_budget (10 ),
132+ style = "Blue.TButton" )
137133 btn_10yr .pack (side = tk .LEFT , padx = 5 )
138134
139135 # Separator
0 commit comments