Improve donation defaults and light contrast
This commit is contained in:
@@ -5,7 +5,7 @@ const Style := preload("res://scripts/ui/ui_style.gd")
|
||||
const DonationAmount := preload("res://scripts/ui/donation_amount.gd")
|
||||
const MINIMUM_CENTS := 500
|
||||
const MAXIMUM_CENTS := 1000000
|
||||
const DEFAULT_CENTS := 2500
|
||||
const DEFAULT_CENTS := 500
|
||||
|
||||
var main: Control
|
||||
var content_grid: GridContainer
|
||||
@@ -13,6 +13,7 @@ var mission_panel: PanelContainer
|
||||
var contribution_panel: PanelContainer
|
||||
var preset_grid: GridContainer
|
||||
var amount_buttons: Array[Button] = []
|
||||
var muted_labels: Array[Label] = []
|
||||
var amount_group := ButtonGroup.new()
|
||||
var custom_amount: LineEdit
|
||||
var donate_button: Button
|
||||
@@ -61,6 +62,7 @@ func _build_ui() -> void:
|
||||
subtitle.add_theme_font_size_override("font_size", 18)
|
||||
subtitle.add_theme_color_override("font_color", Brand.muted_color(UIThemeService.is_dark_mode()))
|
||||
subtitle.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
muted_labels.append(subtitle)
|
||||
page.add_child(subtitle)
|
||||
|
||||
content_grid = GridContainer.new()
|
||||
@@ -141,7 +143,7 @@ func _build_ui() -> void:
|
||||
contribution.add_child(custom_amount)
|
||||
|
||||
donate_button = Button.new()
|
||||
donate_button.text = "Donate $25 securely"
|
||||
donate_button.text = "Donate $5 securely"
|
||||
donate_button.custom_minimum_size = Vector2(0, 58)
|
||||
donate_button.pressed.connect(_on_donate_pressed)
|
||||
contribution.add_child(donate_button)
|
||||
@@ -270,6 +272,7 @@ func _body(value: String) -> Label:
|
||||
label.add_theme_font_size_override("font_size", 17)
|
||||
label.add_theme_color_override("font_color", Brand.muted_color(UIThemeService.is_dark_mode()))
|
||||
label.autowrap_mode = TextServer.AUTOWRAP_WORD_SMART
|
||||
muted_labels.append(label)
|
||||
return label
|
||||
|
||||
|
||||
@@ -282,6 +285,8 @@ func _update_layout() -> void:
|
||||
|
||||
func refresh_theme_controls() -> void:
|
||||
var dark := UIThemeService.is_dark_mode()
|
||||
for label in muted_labels:
|
||||
label.add_theme_color_override("font_color", Brand.muted_color(dark))
|
||||
for panel in [mission_panel, contribution_panel]:
|
||||
if panel != null:
|
||||
var box := Brand.content_card_box(dark, false)
|
||||
|
||||
Reference in New Issue
Block a user