Implement responsive profile and account data controls
This commit is contained in:
@@ -471,11 +471,7 @@ func _apply_theme() -> void:
|
||||
else:
|
||||
label.add_theme_color_override("font_color", Brand.text_color(dark))
|
||||
for input in fields:
|
||||
input.add_theme_color_override("font_color", Brand.text_color(dark))
|
||||
input.add_theme_color_override("font_placeholder_color", Brand.muted_color(dark))
|
||||
input.add_theme_color_override("caret_color", Brand.SKY_BLUE if dark else Brand.ROYAL_BLUE)
|
||||
input.add_theme_stylebox_override("normal", Brand.field_box(dark))
|
||||
input.add_theme_stylebox_override("focus", Brand.field_box(dark, true))
|
||||
_style_auth_field(input, dark)
|
||||
for button in find_children("*", "Button", true, false):
|
||||
var typed := button as Button
|
||||
typed.add_theme_font_override("font", Brand.font)
|
||||
@@ -503,6 +499,16 @@ func _apply_theme() -> void:
|
||||
brand_tagline.add_theme_color_override("default_color", Brand.muted_color(dark))
|
||||
|
||||
|
||||
func _style_auth_field(input: LineEdit, dark: bool) -> void:
|
||||
input.add_theme_color_override("font_color", Brand.text_color(dark))
|
||||
input.add_theme_color_override("font_uneditable_color", Brand.text_color(dark))
|
||||
input.add_theme_color_override("font_placeholder_color", Brand.muted_color(dark))
|
||||
input.add_theme_color_override("caret_color", Brand.SKY_BLUE if dark else Brand.ROYAL_BLUE)
|
||||
input.add_theme_stylebox_override("normal", Brand.field_box(dark))
|
||||
input.add_theme_stylebox_override("focus", Brand.field_box(dark, true))
|
||||
input.add_theme_stylebox_override("read_only", Brand.field_box(dark))
|
||||
|
||||
|
||||
func _on_theme_changed(_is_dark: bool) -> void:
|
||||
_apply_theme()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user