From d375cb4829ec95735caed36bd8e869d9addacf21 Mon Sep 17 00:00:00 2001 From: passivestar <60579014+passivestar@users.noreply.github.com> Date: Sat, 29 Mar 2025 20:37:41 +0400 Subject: [PATCH] Ensure type safety to make the theme works with any gdscript project settings --- minimal_theme.tres | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/minimal_theme.tres b/minimal_theme.tres index cc1eac0..ed72455 100644 --- a/minimal_theme.tres +++ b/minimal_theme.tres @@ -790,14 +790,14 @@ func _init() -> void: # needs trees to be transparent, so it needs to have an explicitly set style for the theme # to still be able to support transparent Trees # See https://github.com/godotengine/godot/issues/99118 - (func(): + (func() -> void: var tileset_editor : Control = EditorInterface.get_base_control().find_children('', 'TileSetEditor', true, false)[0] var expand_panel : Control = tileset_editor.get_child(3) - sb = base_sb.duplicate() - sb.set_corner_radius_all(0) - expand_panel.add_theme_stylebox_override('panel', sb) - tileset_editor.theme_changed.connect(func(): - expand_panel.add_theme_stylebox_override('panel', sb) + var panel_sb : StyleBoxFlat = base_sb.duplicate() + panel_sb.set_corner_radius_all(0) + expand_panel.add_theme_stylebox_override('panel', panel_sb) + var _error : int = tileset_editor.theme_changed.connect(func() -> void: + expand_panel.add_theme_stylebox_override('panel', panel_sb) ) ).call_deferred()