File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -56,12 +56,24 @@ def on_resume(self) -> None:
56
56
print ("Settings screen resumed. Updating settings." )
57
57
self .target_select .set_select_value (self .app .setting_target )
58
58
self .enable_copy_switch .value = self .app .setting_enable_copy
59
+ if self .app .setting_enable_copy :
60
+ self .arduino_path_input .visible = True
61
+ else :
62
+ self .arduino_path_input .visible = False
59
63
self .arduino_path_input .set_input_value (self .app .setting_arduino_path )
60
64
self .arduino_branch_input .set_input_value (self .app .setting_arduino_branch )
61
65
self .idf_branch_input .set_input_value (self .app .setting_idf_branch )
62
66
self .idf_commit_input .set_input_value (self .app .setting_idf_commit )
63
67
self .idf_debug_select .set_select_value (self .app .setting_debug_level )
64
68
69
+ def on_switch_changed (self , event : Switch .Changed ) -> None :
70
+ # Event handler called when a switch is changed
71
+ if event .switch .id == "enable-copy-switch" :
72
+ if event .switch .value :
73
+ self .arduino_path_input .visible = True
74
+ else :
75
+ self .arduino_path_input .visible = False
76
+
65
77
def compose (self ) -> ComposeResult :
66
78
# Compose the target selection screen
67
79
yield Header ()
You can’t perform that action at this time.
0 commit comments