From b52cdc6e7bcbef986d0764fafdb49ed6c29f49a8 Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Sat, 12 Oct 2024 15:44:06 +0300 Subject: [PATCH] Fix some text in the About dialog not having the text color of the theme --- src/UI/Dialogs/AboutDialog.gd | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/UI/Dialogs/AboutDialog.gd b/src/UI/Dialogs/AboutDialog.gd index e610bbbb3..a5a4ffade 100644 --- a/src/UI/Dialogs/AboutDialog.gd +++ b/src/UI/Dialogs/AboutDialog.gd @@ -224,15 +224,20 @@ const DONORS: PackedStringArray = [ @onready var donors_container := $AboutUI/Credits/Donors as VBoxContainer @onready var translators_container := $AboutUI/Credits/Translators as VBoxContainer @onready var licenses_container := $AboutUI/Credits/Licenses as VBoxContainer - @onready var authors := $AboutUI/Credits/Authors/AuthorTree as Tree @onready var donors := $AboutUI/Credits/Donors/DonorTree as Tree @onready var translators := $AboutUI/Credits/Translators/TranslatorTree as Tree @onready var license_tabs := $AboutUI/Credits/Licenses/LicenseTabs as TabBar @onready var license_text := $AboutUI/Credits/Licenses/LicenseText as TextEdit +@onready var pixelorama_slogan := ( + $AboutUI/IconsButtons/SloganAndLinks/VBoxContainer/PixeloramaSlogan as Label +) +@onready var copyright_label := $AboutUI/Copyright as Label func _ready() -> void: + pixelorama_slogan.label_settings.font_color = get_theme_color(&"font_color", &"Label") + copyright_label.label_settings.font_color = get_theme_color(&"font_color", &"Label") create_donors() license_tabs.add_tab("Pixelorama") license_tabs.add_tab("Godot") @@ -249,6 +254,14 @@ func _ready() -> void: license_text.text = licenses[0] +func _notification(what: int) -> void: + if not is_instance_valid(pixelorama_slogan): + return + if what == NOTIFICATION_THEME_CHANGED: + pixelorama_slogan.label_settings.font_color = get_theme_color(&"font_color", &"Label") + copyright_label.label_settings.font_color = get_theme_color(&"font_color", &"Label") + + func _on_AboutDialog_about_to_show() -> void: title = tr("About Pixelorama") + " " + Global.current_version