Drop the redundant status icon and "Review: B..." label from follow-up panels
The choice button above the panel already shows the letter badge, choice text, and percentage, so repeating them in the panel header was redundant now that the panel is docked inside the choice's card. Keeps the collapse toggle, now named FollowupToggle since the old FollowupSummary button it lived on is gone.
This commit is contained in:
@@ -3339,29 +3339,12 @@ func _build_followup_header(content: VBoxContainer, state: Dictionary, expanded:
|
||||
row.add_theme_constant_override("separation", 10)
|
||||
content.add_child(row)
|
||||
|
||||
var status := Label.new()
|
||||
status.text = "✓" if is_main_correct else "x"
|
||||
status.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||
status.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
|
||||
status.custom_minimum_size = Vector2(30, 30)
|
||||
status.add_theme_stylebox_override("normal", Brand.icon_circle_box(dark, accent, 15, true))
|
||||
_set_scaled_label(status, 15, Color.WHITE)
|
||||
row.add_child(status)
|
||||
|
||||
var summary := Button.new()
|
||||
summary.name = "FollowupSummary"
|
||||
summary.flat = true
|
||||
summary.text = "Review: %s. %s" % [_display_label_for_choice_id(str(state.get("choice_id", ""))), str(state.get("choice_text", ""))]
|
||||
summary.alignment = HORIZONTAL_ALIGNMENT_LEFT
|
||||
summary.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
summary.disabled = not interactive
|
||||
_set_scaled_button_font(summary, 15)
|
||||
summary.add_theme_color_override("font_color", Brand.text_color(dark))
|
||||
summary.add_theme_color_override("font_hover_color", accent)
|
||||
summary.add_theme_color_override("font_disabled_color", Brand.text_color(dark))
|
||||
if interactive:
|
||||
summary.pressed.connect(_toggle_followup_state.bind(str(state.get("choice_id", ""))))
|
||||
row.add_child(summary)
|
||||
# The choice button above this panel already shows the letter badge, choice
|
||||
# text, and percentage, so the header only needs a spacer plus the collapse
|
||||
# toggle - repeating "Review: B. ..." and a status icon here was redundant.
|
||||
var spacer := Control.new()
|
||||
spacer.size_flags_horizontal = Control.SIZE_EXPAND_FILL
|
||||
row.add_child(spacer)
|
||||
|
||||
var percentage := _get_choice_selection_percentage(str(state.get("choice_id", "")))
|
||||
if percentage >= 0:
|
||||
@@ -3375,6 +3358,7 @@ func _build_followup_header(content: VBoxContainer, state: Dictionary, expanded:
|
||||
|
||||
if interactive:
|
||||
var toggle := Button.new()
|
||||
toggle.name = "FollowupToggle"
|
||||
toggle.flat = true
|
||||
toggle.tooltip_text = "Collapse review" if expanded else "Expand review"
|
||||
toggle.icon = preload("res://assets/icons/lucide/chevron-down.svg") if expanded else preload("res://assets/icons/lucide/chevron-right.svg")
|
||||
|
||||
Reference in New Issue
Block a user