From f1b290aa73d359e8b69c394918e63e0ee1fa00e2 Mon Sep 17 00:00:00 2001 From: hz Date: Fri, 24 Jul 2026 22:10:49 -0500 Subject: [PATCH] Dock the question toolbar in line with the brand row The toolbar had followed the progress group down into the row below the branding after it moved there - readers expect actions docked to the top brand row, not hanging off the question count. --- scripts/ui/question_player.gd | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/scripts/ui/question_player.gd b/scripts/ui/question_player.gd index 3604e1b..c1df215 100644 --- a/scripts/ui/question_player.gd +++ b/scripts/ui/question_player.gd @@ -102,6 +102,7 @@ var theme_button: Button var question_toolbar: HFlowContainer var header_stack: VBoxContainer var header_row: HBoxContainer +var header_brand: HBoxContainer var header_toolbar_host: HBoxContainer var nav_palette: GridContainer var navigator_popup: PopupPanel @@ -222,7 +223,7 @@ func _ready() -> void: header_stack.add_theme_constant_override("separation", 8) card_content.add_child(header_stack) - var header_brand := HBoxContainer.new() + header_brand = HBoxContainer.new() header_brand.add_theme_constant_override("separation", 8) header_stack.add_child(header_brand) var header_brand_mark := TextureRect.new() @@ -237,6 +238,10 @@ func _ready() -> void: header_wordmark_label.add_theme_font_size_override("font_size", 18) header_brand.add_child(header_wordmark_label) + var header_brand_spacer := Control.new() + header_brand_spacer.size_flags_horizontal = Control.SIZE_EXPAND_FILL + header_brand.add_child(header_brand_spacer) + header_row = HBoxContainer.new() header_row.add_theme_constant_override("separation", 16) header_stack.add_child(header_row) @@ -271,10 +276,6 @@ func _ready() -> void: _set_scaled_label(progress_percent_label, 13, Brand.SLATE) progress_bar_row.add_child(progress_percent_label) - var header_spacer := Control.new() - header_spacer.size_flags_horizontal = Control.SIZE_EXPAND_FILL - header_row.add_child(header_spacer) - timer_label = Label.new() _set_scaled_label(timer_label, 14, Brand.SLATE) timer_label.visible = false @@ -423,7 +424,7 @@ func _ready() -> void: header_toolbar_host = HBoxContainer.new() header_toolbar_host.alignment = BoxContainer.ALIGNMENT_END header_toolbar_host.add_child(question_toolbar) - header_row.add_child(header_toolbar_host) + header_brand.add_child(header_toolbar_host) navigator_popup = PopupPanel.new() navigator_popup.name = "QuestionNavigator" @@ -776,10 +777,10 @@ func _fit_modal_panels() -> void: func _refresh_responsive_layout() -> void: - if header_toolbar_host == null or header_row == null or header_stack == null: + if header_toolbar_host == null or header_brand == null or header_stack == null: return var compact := size.x < 1120.0 - var target_parent: Control = header_row + var target_parent: Control = header_brand if compact: target_parent = header_stack if header_toolbar_host.get_parent() != target_parent: