fix script list hot color / main scene name color overwritten by hover/pressed style

This commit is contained in:
jinyangcruise
2026-02-03 15:40:10 +08:00
parent 3c5e561024
commit 2e9de7bfdb
+3 -3
View File
@@ -1634,14 +1634,14 @@ void ItemList::_notification(int p_what) {
if (!items[i].text.is_empty()) {
Color txt_modulate;
if (items[i].selected && hovered == i) {
if (items[i].custom_fg != Color()) {
txt_modulate = items[i].custom_fg;
} else if (items[i].selected && hovered == i) {
txt_modulate = theme_cache.font_hovered_selected_color;
} else if (items[i].selected) {
txt_modulate = theme_cache.font_selected_color;
} else if (hovered == i) {
txt_modulate = theme_cache.font_hovered_color;
} else if (items[i].custom_fg != Color()) {
txt_modulate = items[i].custom_fg;
} else {
txt_modulate = theme_cache.font_color;
}