fix(ui): safe areas, centered top hub, compact settings sheet

This commit is contained in:
Ratdoku Builder committed 2026-12-02 10:54:33 -06:00
1 parent c6a86d74d9
commit 5402541f59
7 files changed
+95 -58

No files matched your search

+10
View File
@@ -87,6 +87,8 @@ static func round_button(icon_path: String, size: int = 48) -> Button:
b.custom_minimum_size = Vector2(size, size)
b.icon = load(icon_path)
b.expand_icon = false
b.icon_alignment = HORIZONTAL_ALIGNMENT_CENTER
b.alignment = HORIZONTAL_ALIGNMENT_CENTER
b.add_theme_stylebox_override("normal", _round_style(Palette.PAPER))
b.add_theme_stylebox_override("hover", _round_style(Palette.PAPER.lightened(0.04)))
b.add_theme_stylebox_override("pressed", _round_style(Palette.PAPER.darkened(0.06)))
@@ -132,6 +134,14 @@ static func spacer(height: int = GAP) -> Control:
return c
static func safe_top() -> int:
return 30 if OS.has_feature("mobile") else 20
static func safe_bottom() -> int:
return 24 if OS.has_feature("mobile") else 14
static func _button_style(color: Color) -> StyleBoxFlat:
var s := StyleBoxFlat.new()
s.bg_color = color