@@ -11,6 +11,7 @@ var adb_path: String
1111var package_name : String
1212var app_data_dir : String
1313
14+ var topbar : HBoxContainer
1415var tree : Tree
1516var devices_btn : OptionButton
1617var dock_menu_button : MenuButton
@@ -51,20 +52,20 @@ func _ready() -> void:
5152
5253
5354func _setup_ui () -> void :
54- var hbox : = HBoxContainer .new ()
55- add_child (hbox )
55+ topbar = HBoxContainer .new ()
56+ add_child (topbar )
5657
5758 devices_btn = OptionButton .new ()
5859 devices_btn .size_flags_horizontal = Control .SIZE_EXPAND_FILL
5960 devices_btn .custom_minimum_size = Vector2 (32 , 32 )
6061 devices_btn .item_selected .connect (_on_device_selected )
61- hbox .add_child (devices_btn )
62+ topbar .add_child (devices_btn )
6263
6364 var reload_btn = Button .new ()
6465 reload_btn .icon = get_theme_icon ("Reload" , "EditorIcons" )
6566 reload_btn .tooltip_text = "Reload"
6667 reload_btn .pressed .connect (_load_devices )
67- hbox .add_child (reload_btn )
68+ topbar .add_child (reload_btn )
6869
6970 dock_menu_button = MenuButton .new ()
7071 dock_menu_button .icon = get_theme_icon ("GuiTabMenuHl" , "EditorIcons" )
@@ -74,7 +75,7 @@ func _setup_ui() -> void:
7475 popup .add_separator ()
7576 popup .add_icon_item (get_theme_icon ("GDScript" , "EditorIcons" ), "Open Config Window" , 1 )
7677 popup .id_pressed .connect (_on_dock_menu_item_pressed )
77- hbox .add_child (dock_menu_button )
78+ topbar .add_child (dock_menu_button )
7879
7980 tree = Tree .new ()
8081 tree .size_flags_vertical = Control .SIZE_EXPAND_FILL
@@ -86,7 +87,7 @@ func _setup_ui() -> void:
8687
8788 status_label = Label .new ()
8889 status_label .text = "Ready"
89- status_label .add_theme_color_override ("font_color" , Color ( 0.6 , 0.6 , 0.6 ))
90+ status_label .add_theme_color_override ("font_color" , get_theme_color ( "disabled_font_color" , "Editor" ))
9091 add_child (status_label )
9192
9293
@@ -332,9 +333,14 @@ func _execute_threaded(callable: Callable, status_msg: String) -> void:
332333func _update_status (msg : String , busy : bool ) -> void :
333334 is_busy = busy
334335 status_label .text = msg
335- status_label .add_theme_color_override ("font_color" , Color (1 , 0.8 , 0.3 ) if busy else Color (0.6 , 0.6 , 0.6 ))
336336 process_mode = Node .PROCESS_MODE_DISABLED if busy else Node .PROCESS_MODE_INHERIT
337- modulate = Color (1 , 1 , 1 , 0.5 ) if busy else Color (1 , 1 , 1 , 1 )
337+
338+ var busy_color = get_theme_color ("warning_color" , "Editor" )
339+ var idle_color = get_theme_color ("disabled_font_color" , "Editor" )
340+ var modulate_color = Color (1 , 1 , 1 , 0.5 ) if busy else Color (1 , 1 , 1 , 1 )
341+ tree .modulate = modulate_color
342+ topbar .modulate = modulate_color
343+ status_label .add_theme_color_override ("font_color" , busy_color if busy else idle_color )
338344
339345
340346func _run_adb (p_args : PackedStringArray ) -> String :
@@ -345,7 +351,7 @@ func _run_adb(p_args: PackedStringArray) -> String:
345351
346352 var output := []
347353 OS .execute (adb_path , args , output , true )
348- # print(output)
354+ print (output )
349355 return output [0 ] if output .size () > 0 else ""
350356
351357
0 commit comments