refactor(@projects/@magic-civilization): 🎨 delete 14 redundant Label font_color=text.primary overrides (p2-87)
These Label nodes set font_color to text.primary — which is already the Label theme default in ui_theme.tres — so the override was a no-op duplicate. Deleted across 12 scenes; the Labels now inherit the default. Value-preserving by construction (default == deleted value); all targets confirmed Label-typed. gdlint: no new issues (pre-existing class-order/const-name in some files untouched). knowledge_tree render-verified via tech_tree_proof (exit 0). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
3942adf26b
commit
4daab42f72
12 changed files with 0 additions and 14 deletions
|
|
@ -32,7 +32,6 @@ func _build_ui() -> void:
|
|||
_thinking_label = Label.new()
|
||||
_thinking_label.name = "ThinkingLabel"
|
||||
_thinking_label.add_theme_font_size_override("font_size", 24)
|
||||
_thinking_label.add_theme_color_override("font_color", ThemeAssets.color("text.primary"))
|
||||
_thinking_label.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||
_thinking_label.vertical_alignment = VERTICAL_ALIGNMENT_CENTER
|
||||
_thinking_label.set_anchors_preset(Control.PRESET_CENTER)
|
||||
|
|
|
|||
|
|
@ -110,7 +110,6 @@ func refresh() -> void:
|
|||
var lbl: Label = Label.new()
|
||||
lbl.text = text
|
||||
lbl.add_theme_font_size_override("font_size", 13)
|
||||
lbl.add_theme_color_override("font_color", ThemeAssets.color("text.primary"))
|
||||
lbl.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
_vbox.add_child(lbl)
|
||||
|
||||
|
|
|
|||
|
|
@ -123,7 +123,6 @@ func _build_ui() -> void:
|
|||
|
||||
_body_label = Label.new()
|
||||
_body_label.add_theme_font_size_override("font_size", 15)
|
||||
_body_label.add_theme_color_override("font_color", ThemeAssets.color("text.primary"))
|
||||
_body_label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
_body_label.size_flags_vertical = Control.SIZE_EXPAND_FILL
|
||||
vbox.add_child(_body_label)
|
||||
|
|
|
|||
|
|
@ -373,7 +373,6 @@ func show_notification(text: String) -> void:
|
|||
var label: Label = Label.new()
|
||||
label.text = text
|
||||
label.add_theme_font_size_override("font_size", 14)
|
||||
label.add_theme_color_override("font_color", ThemeAssets.color("text.primary"))
|
||||
label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
panel.add_child(label)
|
||||
|
||||
|
|
|
|||
|
|
@ -453,7 +453,6 @@ func _create_node_card(
|
|||
var tier_label: Label = Label.new()
|
||||
tier_label.text = "T%d" % tier
|
||||
tier_label.add_theme_font_size_override("font_size", 10)
|
||||
tier_label.add_theme_color_override("font_color", ThemeAssets.color("text.primary"))
|
||||
top_row.add_child(tier_label)
|
||||
|
||||
var name_label: Label = Label.new()
|
||||
|
|
@ -619,7 +618,6 @@ func _rebuild_detail() -> void:
|
|||
var desc: Label = Label.new()
|
||||
desc.text = desc_text
|
||||
desc.add_theme_font_size_override("font_size", 13)
|
||||
desc.add_theme_color_override("font_color", ThemeAssets.color("text.primary"))
|
||||
desc.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
_detail_vbox.add_child(desc)
|
||||
|
||||
|
|
@ -790,7 +788,6 @@ func _make_tag(text: String, accent: Color) -> Label:
|
|||
var lbl: Label = Label.new()
|
||||
lbl.text = text
|
||||
lbl.add_theme_font_size_override("font_size", 11)
|
||||
lbl.add_theme_color_override("font_color", ThemeAssets.color("text.primary"))
|
||||
var sb: StyleBoxFlat = StyleBoxFlat.new()
|
||||
sb.bg_color = Color(accent.r, accent.g, accent.b, 0.16)
|
||||
sb.border_color = Color(accent.r, accent.g, accent.b, 0.5)
|
||||
|
|
|
|||
|
|
@ -200,7 +200,6 @@ func _build_entry_row(entry: Dictionary) -> Control:
|
|||
var lbl: Label = Label.new()
|
||||
lbl.text = line
|
||||
lbl.add_theme_font_size_override("font_size", 13)
|
||||
lbl.add_theme_color_override("font_color", ThemeAssets.color("text.primary"))
|
||||
return lbl
|
||||
var rich: RichTextLabel = RichTextLabel.new()
|
||||
rich.bbcode_enabled = true
|
||||
|
|
|
|||
|
|
@ -116,7 +116,6 @@ func _populate_hero_strip() -> void:
|
|||
|
||||
if stalemate:
|
||||
_banner_label.text = ThemeVocabulary.lookup("endgame_banner_gameover")
|
||||
_banner_label.add_theme_color_override("font_color", ThemeAssets.color("text.primary"))
|
||||
else:
|
||||
var human_idx: int = _find_human_player_index()
|
||||
var player_is_winner: bool = _winner_index == human_idx
|
||||
|
|
|
|||
|
|
@ -381,7 +381,6 @@ func _build_axes_row(axes: Dictionary) -> HBoxContainer:
|
|||
var value: Label = Label.new()
|
||||
value.text = str(int(axes.get(key, 0)))
|
||||
value.add_theme_font_size_override("font_size", 15)
|
||||
value.add_theme_color_override("font_color", ThemeAssets.color("text.primary"))
|
||||
value.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||
cell.add_child(value)
|
||||
row.add_child(cell)
|
||||
|
|
|
|||
|
|
@ -52,7 +52,6 @@ func _populate_clans() -> void:
|
|||
desc_label.text = clan.get("description", "")
|
||||
desc_label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
desc_label.add_theme_font_size_override("font_size", 13)
|
||||
desc_label.add_theme_color_override("font_color", ThemeAssets.color("text.primary"))
|
||||
row.add_child(desc_label)
|
||||
_clans_container.add_child(row)
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ func _populate(ids: Array[String]) -> void:
|
|||
var name_label: Label = Label.new()
|
||||
name_label.text = dec.get("name", id)
|
||||
name_label.add_theme_font_size_override("font_size", 15)
|
||||
name_label.add_theme_color_override("font_color", ThemeAssets.color("text.primary"))
|
||||
text_col.add_child(name_label)
|
||||
var desc_label: Label = Label.new()
|
||||
desc_label.text = dec.get("description", "")
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@ func _on_victory_achieved(player_index: int, victory_type: String) -> void:
|
|||
|
||||
if stalemate:
|
||||
_result_label.text = ThemeVocabulary.lookup("stalemate").to_upper()
|
||||
_result_label.add_theme_color_override("font_color", ThemeAssets.color("text.primary"))
|
||||
_player_label.text = ThemeVocabulary.lookup("turn_limit_reached")
|
||||
elif player != null and player.is_human:
|
||||
_result_label.text = ThemeVocabulary.lookup("victory").to_upper()
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@ func _ready() -> void:
|
|||
|
||||
_body = Label.new()
|
||||
_body.add_theme_font_size_override("font_size", 13)
|
||||
_body.add_theme_color_override("font_color", ThemeAssets.color("text.primary"))
|
||||
_body.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
col.add_child(_body)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue