From 6557998eee86cf8b08d36a006941618aa5b07861 Mon Sep 17 00:00:00 2001 From: RobinFiredrake Date: Sun, 8 Nov 2026 19:05:24 -0600 Subject: [PATCH] =?UTF-8?q?Fit=20the=20Build=20bar:=20icon-only=20Undo/Red?= =?UTF-8?q?o,=20Test=20board=20in=20Board=20=E2=96=BE,=20hint=20in=20toolt?= =?UTF-8?q?ip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With undo, redo, Test board and Arrange added, the Build-mode top bar overflowed at 1440 px and pushed the zoom and Map buttons off screen. Undo and Redo are now icon buttons whose tooltips name the step, Test board is reached from Board ▾, and Build mode's hint moves to the hint label's tooltip. Co-Authored-By: Claude Opus 5.5 --- ui/main.gd | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/ui/main.gd b/ui/main.gd index e4aa2bf..d6ee7b3 100644 --- a/ui/main.gd +++ b/ui/main.gd @@ -223,10 +223,7 @@ func _build_top_bar() -> Control: _board_menu.test_requested.connect(open_test_board) _board_menu.export_requested.connect(export_collection) tools.add_child(_board_menu) - var test_btn := Style.bar_button("Test board…") - test_btn.tooltip_text = "Roll the board many times and look for problems" - test_btn.pressed.connect(open_test_board) - tools.add_child(test_btn) + # Test board… lives in the Board ▾ menu to keep the Build bar from overflowing. tools.add_child(_make_arrange_menu()) tools.visible = false h.add_child(tools) @@ -384,7 +381,10 @@ func set_mode(m: Mode) -> void: mode = m _play_button.set_pressed_no_signal(m == Mode.PLAY) _build_button.set_pressed_no_signal(m == Mode.BUILD) - _hint.text = HINTS[m] + # Build mode's bar is full of tools, so its hint moves into the tooltip; + # the (empty) label still stretches to push the right-hand buttons over. + _hint.text = HINTS[m] if m == Mode.PLAY else "" + _hint.tooltip_text = HINTS[m] _build_tools.visible = m == Mode.BUILD board.pipes.hover_key = "" clear_selection() @@ -3260,6 +3260,12 @@ func _make_history_buttons(tools: HBoxContainer) -> void: _redo_button.pressed.connect(func() -> void: redo()) _bar_icon(_redo_button, func(c: Control) -> void: _draw_turn_arrow(c, true)) for b in [_undo_button, _redo_button]: + # Icon-only (the tooltip names the step), so the Build bar fits at 1280 px. + (b as Button).text = "" + for n in ["normal", "hover", "pressed", "hover_pressed", "disabled"]: + var sb := (b as Button).get_theme_stylebox(n) as StyleBoxFlat + if sb: + sb.content_margin_left = 26 (b as Button).focus_mode = Control.FOCUS_NONE (b as Button).add_theme_color_override("font_disabled_color", Color(Style.ON_FELT, 0.35)) tools.add_child(b)