Skip to content

Commit b5ea83d

Browse files
Snaielbitbrain
authored andcommitted
check font and queue_free titlebar child
fixes failed debugger_test.gd case and orphans
1 parent e36bd75 commit b5ea83d

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

addons/beehave/debug/new_graph_node.gd

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,17 @@ func _ready() -> void:
6262
icon_rect.stretch_mode = TextureRect.STRETCH_KEEP_ASPECT_CENTERED
6363

6464
titlebar_hbox = get_titlebar_hbox()
65-
titlebar_hbox.remove_child(titlebar_hbox.get_child(0))
65+
titlebar_hbox.get_child(0).queue_free()
6666
titlebar_hbox.alignment = BoxContainer.ALIGNMENT_BEGIN
6767
titlebar_hbox.add_child(icon_rect)
6868

6969
title_label = Label.new()
7070
title_label.add_theme_color_override("font_color", Color.WHITE)
71-
var title_font: FontVariation = get_theme_font("title_font").duplicate()
72-
title_font.variation_embolden = 1
71+
var title_font: Font = get_theme_font("title_font").duplicate()
72+
if title_font is FontVariation:
73+
title_font.variation_embolden = 1
74+
elif title_font is FontFile:
75+
title_font.font_weight = 700
7376
title_label.add_theme_font_override("font", title_font)
7477
title_label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
7578
title_label.size_flags_horizontal = Control.SIZE_EXPAND_FILL

0 commit comments

Comments
 (0)