Redesign exam and CCS experiences
This commit is contained in:
@@ -28,6 +28,24 @@ 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 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")
|
||||
Brand.set_theme_toggle_icon(theme_toggle, false)
|
||||
_assert(theme_toggle.text.is_empty() and theme_toggle.icon == Brand.MOON_ICON, "light mode should use the bundled moon icon")
|
||||
var login = load("res://scripts/ui/login_screen.gd").new()
|
||||
var password := LineEdit.new()
|
||||
var password_reveal := Button.new()
|
||||
password.secret = true
|
||||
login._refresh_password_reveal(password, password_reveal)
|
||||
var show_icon := password_reveal.icon
|
||||
password.secret = false
|
||||
login._refresh_password_reveal(password, password_reveal)
|
||||
_assert(show_icon != null and password_reveal.icon != null and show_icon != password_reveal.icon, "password visibility should switch bundled eye icons")
|
||||
password_reveal.free()
|
||||
password.free()
|
||||
login.free()
|
||||
theme_toggle.free()
|
||||
|
||||
Style.set_dark_mode(true)
|
||||
Style.refresh_tree(root, false)
|
||||
|
||||
Reference in New Issue
Block a user