fix(shell): dark DockButton theme variation for the system dock
DarkPanel is a PanelContainer-base variation (only a `panel` stylebox); a Button looks up normal/hover/pressed, which don't exist on it, so SystemDock's menu buttons rendered as default gray Godot buttons instead of mock-faithful dark nav buttons. Add a dedicated Button-base DockButton variation (Palette-only colours, dock-dark normal/hover/pressed styleboxes), point system_dock.gd's menu buttons at it, and regenerate the committed game_theme.tres artifact from the builder. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -35,6 +35,7 @@ static func build_theme() -> Theme:
|
||||
_fonts(theme)
|
||||
_primary_cta(theme)
|
||||
_tabs(theme)
|
||||
_dock_button(theme)
|
||||
_chip(theme)
|
||||
_tiles(theme)
|
||||
_cards_and_panels(theme)
|
||||
@@ -106,6 +107,19 @@ static func _tabs(theme: Theme) -> void:
|
||||
theme.set_color(&"font_color", tab_active, Palette.CREAM_BRIGHT)
|
||||
|
||||
|
||||
static func _dock_button(theme: Theme) -> void:
|
||||
# Dark nav button for the slide-in system dock (mock 2a). Button-base so
|
||||
# normal/hover/pressed styleboxes actually apply (a PanelContainer variation's
|
||||
# lone `panel` stylebox does not skin a Button). Colours are dock-dark.
|
||||
var k := ThemeKeys.DOCK_BUTTON
|
||||
theme.set_type_variation(k, "Button")
|
||||
theme.set_stylebox(&"normal", k, _flat(Palette.DARK_PANEL_70, Palette.BORDER_1, 1, 8))
|
||||
theme.set_stylebox(&"hover", k, _flat(Palette.DARK_PANEL_85, Palette.GOLD, 1, 8))
|
||||
theme.set_stylebox(&"pressed", k, _flat(Palette.DARK_PANEL_90, Palette.GOLD, 1, 8))
|
||||
theme.set_stylebox(&"focus", k, StyleBoxEmpty.new())
|
||||
theme.set_color(&"font_color", k, Palette.CREAM_SECONDARY)
|
||||
|
||||
|
||||
static func _chip(theme: Theme) -> void:
|
||||
# Base chip; the semantic colour (red/gold/grey) is applied per-use by script.
|
||||
var k := ThemeKeys.CHIP
|
||||
|
||||
@@ -9,6 +9,7 @@ const PRIMARY_CTA := &"PrimaryCTA"
|
||||
const TAB := &"Tab"
|
||||
const TAB_ACTIVE := &"TabActive"
|
||||
const CHIP := &"Chip"
|
||||
const DOCK_BUTTON := &"DockButton"
|
||||
const ITEM_TILE := &"ItemTile"
|
||||
const ITEM_TILE_EMPTY := &"ItemTileEmpty"
|
||||
const PARCHMENT_CARD := &"ParchmentCard"
|
||||
@@ -28,6 +29,7 @@ const ALL := {
|
||||
TAB: "Button",
|
||||
TAB_ACTIVE: "Button",
|
||||
CHIP: "Button",
|
||||
DOCK_BUTTON: "Button",
|
||||
ITEM_TILE: "PanelContainer",
|
||||
ITEM_TILE_EMPTY: "PanelContainer",
|
||||
PARCHMENT_CARD: "PanelContainer",
|
||||
|
||||
@@ -32,7 +32,7 @@ func _ready() -> void:
|
||||
var id: StringName = entry[0]
|
||||
var button := Button.new()
|
||||
button.text = "%s %s" % [entry[2], entry[1]]
|
||||
button.theme_type_variation = ThemeKeys.DARK_PANEL
|
||||
button.theme_type_variation = ThemeKeys.DOCK_BUTTON
|
||||
button.pressed.connect(func(): screen_requested.emit(id))
|
||||
_menu.add_child(button)
|
||||
_screen_buttons[id] = button
|
||||
|
||||
Reference in New Issue
Block a user