@@ -36,15 +36,15 @@ def __init__(self, flight_controller: FlightController):
36
36
37
37
# Create a frame to hold all the labels and text fields
38
38
self .info_frame = ttk .Frame (self .main_frame )
39
- self .info_frame .pack (padx = 20 , pady = 20 )
39
+ self .info_frame .pack (fill = tk . BOTH , padx = 20 , pady = 20 )
40
40
41
41
# Dynamically create labels and text fields for each attribute
42
42
for row_nr , (description , attr_value ) in enumerate (flight_controller .info .get_info ().items ()):
43
43
label = ttk .Label (self .info_frame , text = f"{ description } :" )
44
44
label .grid (row = row_nr , column = 0 , sticky = "w" )
45
45
46
- text_field = ttk .Entry (self .info_frame , width = 60 )
47
- text_field .grid (row = row_nr , column = 1 , sticky = "w" )
46
+ text_field = ttk .Entry (self .info_frame )
47
+ text_field .grid (row = row_nr , column = 1 , sticky = "ew" , columnspan = 1 )
48
48
49
49
# Check if the attribute exists and has a non-empty value before inserting
50
50
if attr_value :
@@ -56,6 +56,8 @@ def __init__(self, flight_controller: FlightController):
56
56
text_field .insert (tk .END , "N/A" ) # Insert "Not Available" if the attribute is missing or empty
57
57
text_field .configure (state = "readonly" )
58
58
59
+ self .info_frame .columnconfigure (1 , weight = 1 )
60
+
59
61
logging_info ("Firmware Version: %s" , flight_controller .info .flight_sw_version_and_type )
60
62
logging_info (f"Firmware first 8 hex bytes of the FC git hash: { flight_controller .info .flight_custom_version } " )
61
63
logging_info (f"Firmware first 8 hex bytes of the ChibiOS git hash: { flight_controller .info .os_custom_version } " )
0 commit comments