diff --git a/scripts/ui/login_screen.gd b/scripts/ui/login_screen.gd index 036ef07..eefbc2b 100644 --- a/scripts/ui/login_screen.gd +++ b/scripts/ui/login_screen.gd @@ -351,11 +351,17 @@ func _add_legal_consent(parent: VBoxContainer) -> CheckBox: # wrapping then stays confined to its column, and "Terms of Service"/ # "Privacy Policy" render as inline links rather than a duplicate row # of link buttons underneath. + var margin := MarginContainer.new() + margin.add_theme_constant_override("margin_top", 8) + margin.add_theme_constant_override("margin_bottom", 8) + parent.add_child(margin) var row := HBoxContainer.new() row.add_theme_constant_override("separation", 12) - parent.add_child(row) + margin.add_child(row) var check := CheckBox.new() - check.custom_minimum_size = Vector2(26, 26) + check.name = "LegalConsentCheckBox" + check.custom_minimum_size = Vector2(22, 22) + check.size_flags_vertical = Control.SIZE_SHRINK_BEGIN check.add_theme_icon_override("unchecked", _blank_icon()) row.add_child(check) var consent_text := RichTextLabel.new() @@ -365,7 +371,7 @@ func _add_legal_consent(parent: VBoxContainer) -> CheckBox: consent_text.meta_underlined = false consent_text.size_flags_horizontal = Control.SIZE_EXPAND_FILL consent_text.add_theme_font_override("normal_font", Brand.font) - consent_text.add_theme_font_size_override("normal_font_size", 15) + consent_text.add_theme_font_size_override("normal_font_size", 13) consent_text.meta_clicked.connect(func(meta: Variant): _open_legal_document(str(meta))) legal_consent_texts.append(consent_text) row.add_child(consent_text) @@ -596,10 +602,13 @@ func _apply_theme() -> void: checkbox_box.border_color = Brand.SKY_BLUE if dark else Brand.ROYAL_BLUE checkbox_box.set_border_width_all(2) checkbox_box.set_corner_radius_all(6) + checkbox_box.set_content_margin_all(0) for cb in find_children("*", "CheckBox", true, false): for state in ["normal", "hover", "pressed", "focus"]: cb.add_theme_stylebox_override(state, checkbox_box) for button in find_children("*", "Button", true, false): + if button is CheckBox: + continue var typed := button as Button typed.add_theme_font_override("font", Brand.font) typed.add_theme_color_override("font_color", Brand.text_color(dark))