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)