6 if get_parent() is SubViewport:
9 add_theme_stylebox_override("panel", get_theme_stylebox("Background", "EditorStyles"))
10 $Tabs/Close.icon = get_theme_icon("Close", "EditorIcons")
12 for tab in $Tabs/Tabs.get_children():
13 tab.add_theme_color_override("font_selected_color", get_theme_color("accent_color", "Editor"))
14 tab.add_theme_font_override("font", get_theme_font("main", "EditorFonts"))
15 tab.toggled.connect(tab_changed.bind(tab.get_index()+1))
18 func tab_changed(enabled:bool, index:int) -> void:
19 for child in $Tabs.get_children():
20 if child.get_index() == 0 or child.get_index() == index or child is Button:
22 if child.get_index() == index:
28 for child in $Tabs/Tabs.get_children():
29 child.set_pressed_no_signal(index-1 == child.get_index())
34 $Tabs/BrokenReferences.update_indicator()
37 func _on_close_pressed() -> void:
38 get_parent()._on_close_requested()