Fix loader tagline centering and dashboard card icons

Centers the loader's tagline under the logo, replaces the broken
info-glyph (a Unicode character missing from the Inter font, which
rendered as a tofu box) with a drawn circle-and-i badge, and swaps
the stat-card icons to match the mockup: book for Question Bank
Rating, bar chart for Exam Readiness, star for Average Score.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
hz
2026-07-26 01:06:05 -05:00
co-authored by Claude Sonnet 5
parent 4251885a73
commit ef44347bf6
8 changed files with 141 additions and 6 deletions
+25 -6
View File
@@ -82,7 +82,7 @@ func _build() -> void:
qbank_sparkline = DashboardSparkline.new()
qbank_sparkline.custom_minimum_size = Vector2(0, 34)
_add_stat_card("qbank", "Question Bank Rating", "chart-no-axes-column-increasing", Brand.ROYAL_BLUE, qbank_sparkline)
_add_stat_card("qbank", "Question Bank Rating", "book-open", Brand.ROYAL_BLUE, qbank_sparkline)
ccs_sparkline = DashboardSparkline.new()
ccs_sparkline.custom_minimum_size = Vector2(0, 34)
@@ -90,7 +90,7 @@ func _build() -> void:
readiness_segment_bar = DashboardSegmentBar.new()
readiness_segment_bar.custom_minimum_size = Vector2(0, 10)
_add_stat_card("readiness", "Exam Readiness", "activity", Brand.PURPLE, readiness_segment_bar)
_add_stat_card("readiness", "Exam Readiness", "chart-no-axes-column-increasing", Brand.PURPLE, readiness_segment_bar)
accuracy_progress_bar = ProgressBar.new()
accuracy_progress_bar.show_percentage = false
@@ -98,7 +98,7 @@ func _build() -> void:
accuracy_progress_bar.max_value = 100.0
accuracy_progress_bar.custom_minimum_size = Vector2(0, 10)
_style_progress(accuracy_progress_bar, Brand.AMBER)
_add_stat_card("accuracy", "Average Score", "circle-check", Brand.AMBER, accuracy_progress_bar)
_add_stat_card("accuracy", "Average Score", "star", Brand.AMBER, accuracy_progress_bar)
analytics_grid = GridContainer.new()
analytics_grid.columns = 2
@@ -415,6 +415,27 @@ func _render_recent(items: Array) -> void:
recent_list.add_child(row)
func _info_badge(dark: bool) -> Control:
var badge := PanelContainer.new()
badge.custom_minimum_size = Vector2(15, 15)
badge.size_flags_vertical = Control.SIZE_SHRINK_BEGIN
var box := StyleBoxFlat.new()
box.bg_color = Color.TRANSPARENT
box.border_color = Brand.muted_color(dark)
box.set_border_width_all(1)
box.set_corner_radius_all(8)
box.content_margin_left = 0
box.content_margin_right = 0
box.content_margin_top = 0
box.content_margin_bottom = 0
badge.add_theme_stylebox_override("panel", box)
var glyph := _label("i", 10, Brand.muted_color(dark), true)
glyph.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
glyph.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
badge.add_child(glyph)
return badge
func _add_stat_card(key: String, title: String, icon_name: String, accent: Color, bottom_visual: Control) -> void:
var dark := UIThemeService.is_dark_mode()
var card_content := VBoxContainer.new()
@@ -440,9 +461,7 @@ func _add_stat_card(key: String, title: String, icon_name: String, accent: Color
title_label.size_flags_horizontal = Control.SIZE_EXPAND_FILL
title_label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
header.add_child(title_label)
var info_label := _label("ⓘ", 13, Brand.muted_color(dark))
info_label.size_flags_vertical = Control.SIZE_SHRINK_BEGIN
header.add_child(info_label)
header.add_child(_info_badge(dark))
var value := _label("--", 28, Brand.text_color(dark), true)
card_content.add_child(value)