Fix narrow web layouts and loader branding

This commit is contained in:
hz
2026-07-16 23:07:26 -05:00
parent a778a680e0
commit ae283c2243
6 changed files with 110 additions and 34 deletions
+14 -2
View File
@@ -51,6 +51,12 @@ func _update_responsive_layout() -> void:
_apply_screen_margins(current_screen_name)
if header_stats != null:
header_stats.visible = size.x >= 720.0
if user_label != null:
user_label.visible = size.x >= 760.0
if feedback_button != null:
feedback_button.visible = AuthState.is_logged_in and size.x >= 560.0
if account_chevron_button != null:
account_chevron_button.visible = size.x >= 480.0
if drawer_open and not compact_shell:
_close_drawer()
if app_menu != null:
@@ -185,7 +191,9 @@ func _build_ui() -> void:
theme_button = Button.new()
theme_button.tooltip_text = "Switch color theme"
theme_button.custom_minimum_size = Vector2(44, 44)
theme_button.size_flags_horizontal = Control.SIZE_SHRINK_CENTER
theme_button.size_flags_vertical = Control.SIZE_SHRINK_CENTER
theme_button.focus_mode = Control.FOCUS_NONE
theme_button.pressed.connect(theme_service.toggle_theme)
_style_shell_theme_button(theme_button)
header.add_child(theme_button)
@@ -592,7 +600,11 @@ func _style_shell_theme_button(button: Button) -> void:
normal.bg_color = Color("111b30") if dark else Brand.LIGHT_SURFACE
normal.border_color = Color("33415d") if dark else Brand.LIGHT_BORDER
normal.set_border_width_all(1)
normal.set_corner_radius_all(22)
normal.set_corner_radius_all(24)
normal.content_margin_left = 10
normal.content_margin_right = 10
normal.content_margin_top = 10
normal.content_margin_bottom = 10
var hover := normal.duplicate() as StyleBoxFlat
hover.border_color = Brand.AMBER
button.add_theme_stylebox_override("normal", normal)
@@ -628,7 +640,7 @@ func _refresh_header_stats() -> void:
if account_button != null:
account_button.text = _account_initials(AuthState.username)
if feedback_button != null:
feedback_button.visible = AuthState.is_logged_in
feedback_button.visible = AuthState.is_logged_in and size.x >= 560.0
feedback_button.icon = preload("res://assets/icons/lucide/message-square.svg")
feedback_button.add_theme_constant_override("icon_max_width", 21)