Show blinking caret in authentication fields
This commit is contained in:
@@ -316,6 +316,8 @@ func _add_field(parent: VBoxContainer, label_text: String, placeholder: String,
|
||||
var input := LineEdit.new()
|
||||
input.placeholder_text = placeholder
|
||||
input.secret = secret
|
||||
input.caret_blink = true
|
||||
input.caret_blink_interval = 0.5
|
||||
input.custom_minimum_size = Vector2(0, 68)
|
||||
input.add_theme_font_size_override("font_size", 17)
|
||||
input.add_theme_font_override("font", Brand.font)
|
||||
@@ -467,6 +469,7 @@ func _apply_theme() -> void:
|
||||
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))
|
||||
for button in find_children("*", "Button", true, false):
|
||||
|
||||
Reference in New Issue
Block a user