refactor(@projects/@magic-civilization): 🎨 hotkey_sheet labels → theme_type_variation (p2-87 override→inheritance)
Migrate 6 font_color overrides to theme_type_variation (LabelTitle/Muted/Gold/Disabled) and delete 1 redundant text.primary override (== Label theme default). Inline StyleBoxFlat (panel bg) left for the StyleBox sub-sweep. Value-preserving; render-verified via hotkey_sheet_proof — title/headers gold, keys gold, descriptions inherit default, no regressions. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
a86aa6f67c
commit
3b09bb35a1
1 changed files with 6 additions and 7 deletions
|
|
@ -78,7 +78,7 @@ func _build_ui() -> void:
|
|||
var title: Label = Label.new()
|
||||
title.text = ThemeVocabulary.lookup("hotkey_sheet_title")
|
||||
title.add_theme_font_size_override("font_size", 24)
|
||||
title.add_theme_color_override("font_color", ThemeAssets.color("text.title"))
|
||||
title.theme_type_variation = "LabelTitle"
|
||||
vbox.add_child(title)
|
||||
|
||||
_grid = GridContainer.new()
|
||||
|
|
@ -93,7 +93,7 @@ func _build_ui() -> void:
|
|||
var footer: Label = Label.new()
|
||||
footer.text = ThemeVocabulary.lookup("hotkey_sheet_footer")
|
||||
footer.add_theme_font_size_override("font_size", 12)
|
||||
footer.add_theme_color_override("font_color", ThemeAssets.color("text.muted"))
|
||||
footer.theme_type_variation = "LabelMuted"
|
||||
footer.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
|
||||
vbox.add_child(footer)
|
||||
|
||||
|
|
@ -192,7 +192,7 @@ func _add_group_header(grid: GridContainer, text: String) -> void:
|
|||
var header: Label = Label.new()
|
||||
header.text = text
|
||||
header.add_theme_font_size_override("font_size", 15)
|
||||
header.add_theme_color_override("font_color", ThemeAssets.color("accent.gold"))
|
||||
header.theme_type_variation = "LabelGold"
|
||||
grid.add_child(header)
|
||||
|
||||
|
||||
|
|
@ -200,13 +200,12 @@ func _add_row(grid: GridContainer, keys: String, description: String) -> void:
|
|||
var key_label: Label = Label.new()
|
||||
key_label.text = keys
|
||||
key_label.add_theme_font_size_override("font_size", 13)
|
||||
key_label.add_theme_color_override("font_color", ThemeAssets.color("text.title"))
|
||||
key_label.theme_type_variation = "LabelTitle"
|
||||
key_label.custom_minimum_size = Vector2(140, 0)
|
||||
grid.add_child(key_label)
|
||||
var desc_label: Label = Label.new()
|
||||
desc_label.text = description
|
||||
desc_label.add_theme_font_size_override("font_size", 13)
|
||||
desc_label.add_theme_color_override("font_color", ThemeAssets.color("text.primary"))
|
||||
grid.add_child(desc_label)
|
||||
|
||||
|
||||
|
|
@ -214,13 +213,13 @@ func _add_empty_row(grid: GridContainer) -> void:
|
|||
var left: Label = Label.new()
|
||||
left.text = "—"
|
||||
left.add_theme_font_size_override("font_size", 13)
|
||||
left.add_theme_color_override("font_color", ThemeAssets.color("text.disabled"))
|
||||
left.theme_type_variation = "LabelDisabled"
|
||||
left.custom_minimum_size = Vector2(140, 0)
|
||||
grid.add_child(left)
|
||||
var right: Label = Label.new()
|
||||
right.text = ThemeVocabulary.lookup("hotkey_group_empty")
|
||||
right.add_theme_font_size_override("font_size", 13)
|
||||
right.add_theme_color_override("font_color", ThemeAssets.color("text.disabled"))
|
||||
right.theme_type_variation = "LabelDisabled"
|
||||
grid.add_child(right)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue