From 3f82ff6fb5bf08f38993726af1389401b7c79103 Mon Sep 17 00:00:00 2001 From: Natalie Date: Fri, 19 Jun 2026 04:20:26 -0500 Subject: [PATCH] =?UTF-8?q?refactor(@projects/@magic-civilization):=20?= =?UTF-8?q?=F0=9F=8E=A8=20happiness=5Fbreakdown=5Fpanel=20labels=20?= =?UTF-8?q?=E2=86=92=20theme=5Ftype=5Fvariation=20(p2-87)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Migrate 5 font_color overrides to theme_type_variation (LabelTitle/Secondary/Positive/Negative/Muted). Inline StyleBoxFlat (panel bg) left for the StyleBox sub-sweep. Value-preserving (variations carry the same token colours) + gdlint clean. No direct render harness (this panel opens on in-game interaction, not coverable by a proof scene or the magic-civ open_screen surface); the variation pattern is render-proven by the statistics + hotkey_sheet iterations. Co-Authored-By: Claude Opus 4.8 (1M context) --- .../engine/scenes/hud/happiness_breakdown_panel.gd | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/game/engine/scenes/hud/happiness_breakdown_panel.gd b/src/game/engine/scenes/hud/happiness_breakdown_panel.gd index 5f3a1b11..58153ebb 100644 --- a/src/game/engine/scenes/hud/happiness_breakdown_panel.gd +++ b/src/game/engine/scenes/hud/happiness_breakdown_panel.gd @@ -31,7 +31,7 @@ func _ready() -> void: var title: Label = Label.new() title.text = ThemeVocabulary.lookup("happiness_breakdown_title") title.add_theme_font_size_override("font_size", 14) - title.add_theme_color_override("font_color", ThemeAssets.color("text.title")) + title.theme_type_variation = "LabelTitle" title.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER _vbox.add_child(title) @@ -68,7 +68,7 @@ func _add_line(label_text: String, value: int) -> void: lbl.text = label_text lbl.size_flags_horizontal = Control.SIZE_EXPAND_FILL lbl.add_theme_font_size_override("font_size", 13) - lbl.add_theme_color_override("font_color", ThemeAssets.color("text.secondary")) + lbl.theme_type_variation = "LabelSecondary" row.add_child(lbl) var val_lbl: Label = Label.new() @@ -76,11 +76,11 @@ func _add_line(label_text: String, value: int) -> void: val_lbl.horizontal_alignment = HORIZONTAL_ALIGNMENT_RIGHT val_lbl.add_theme_font_size_override("font_size", 13) if value > 0: - val_lbl.add_theme_color_override("font_color", ThemeAssets.color("semantic.positive")) + val_lbl.theme_type_variation = "LabelPositive" elif value < 0: - val_lbl.add_theme_color_override("font_color", ThemeAssets.color("semantic.negative")) + val_lbl.theme_type_variation = "LabelNegative" else: - val_lbl.add_theme_color_override("font_color", ThemeAssets.color("text.muted")) + val_lbl.theme_type_variation = "LabelMuted" row.add_child(val_lbl) _vbox.add_child(row)