Implement responsive profile and account data controls
This commit is contained in:
@@ -28,6 +28,12 @@ func _initialize() -> void:
|
||||
_assert(light_card.border_color.is_equal_approx(Brand.ROYAL_BLUE), "active light cards should use the primary blue border")
|
||||
var light_field := Brand.field_box(false)
|
||||
_assert(light_field.border_color.is_equal_approx(Brand.LIGHT_BORDER), "light fields should use the semantic cool-gray border")
|
||||
var explicitly_light_panel := PanelContainer.new()
|
||||
explicitly_light_panel.add_theme_stylebox_override("panel", Brand.content_card_box(false, false))
|
||||
root.add_child(explicitly_light_panel)
|
||||
Style.refresh_tree(root, true)
|
||||
var preserved_light_box := explicitly_light_panel.get_theme_stylebox("panel") as StyleBoxFlat
|
||||
_assert(preserved_light_box.bg_color.is_equal_approx(Color.WHITE), "a screen's explicit light styles should not be translated back to dark")
|
||||
var theme_toggle := Button.new()
|
||||
Brand.set_theme_toggle_icon(theme_toggle, true)
|
||||
_assert(theme_toggle.text.is_empty() and theme_toggle.icon == Brand.SUN_ICON, "dark mode should use the bundled sun icon")
|
||||
@@ -50,6 +56,11 @@ func _initialize() -> void:
|
||||
var auth_field: LineEdit = login._add_field(field_parent, "Email", "[email protected]")
|
||||
_assert(auth_field.caret_blink, "authentication fields should display a blinking caret")
|
||||
_assert(is_equal_approx(auth_field.caret_blink_interval, 0.5), "authentication field caret should blink at a visible interval")
|
||||
login._style_auth_field(auth_field, false)
|
||||
var editable_box := auth_field.get_theme_stylebox("normal") as StyleBoxFlat
|
||||
var read_only_box := auth_field.get_theme_stylebox("read_only") as StyleBoxFlat
|
||||
_assert(read_only_box.bg_color.is_equal_approx(editable_box.bg_color), "authentication fields should retain their surface while a request is pending")
|
||||
_assert(is_equal_approx(read_only_box.content_margin_left, editable_box.content_margin_left), "authentication fields should retain their text inset while a request is pending")
|
||||
login.free()
|
||||
theme_toggle.free()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user