Redesign exam and CCS experiences
This commit is contained in:
@@ -8,6 +8,8 @@ const MAGENTA := Color("d946ef")
|
||||
const TEAL := Color("14b8a6")
|
||||
const SUCCESS := Color("22c55e")
|
||||
const AMBER := Color("f59e0b")
|
||||
const SUN_ICON := preload("res://assets/icons/lucide/sun.svg")
|
||||
const MOON_ICON := preload("res://assets/icons/lucide/moon.svg")
|
||||
const SLATE := Color("94a3b8")
|
||||
const DARK_TEXT := Color("f8fafc")
|
||||
const LIGHT_TEXT := Color("0f172a")
|
||||
@@ -169,3 +171,12 @@ static func gradient_button_box() -> StyleBoxTexture:
|
||||
|
||||
static func apply_font(control: Control) -> void:
|
||||
control.add_theme_font_override("font", font)
|
||||
|
||||
|
||||
static func set_theme_toggle_icon(button: Button, dark: bool) -> void:
|
||||
button.text = ""
|
||||
button.icon = SUN_ICON if dark else MOON_ICON
|
||||
button.expand_icon = false
|
||||
button.add_theme_constant_override("icon_max_width", 22)
|
||||
for color_name in ["icon_normal_color", "icon_hover_color", "icon_pressed_color", "icon_focus_color"]:
|
||||
button.add_theme_color_override(color_name, AMBER)
|
||||
|
||||
Reference in New Issue
Block a user