Fix Label3D, TextMesh & Font not following project default theme in editor

This commit is contained in:
Micky
2024-03-09 12:48:08 +01:00
parent f28964805e
commit ba867042a2
3 changed files with 23 additions and 4 deletions

View File

@@ -2861,7 +2861,12 @@ Ref<Font> FontVariation::_get_base_font_or_default() const {
ThemeDB::get_singleton()->get_native_type_dependencies(get_class_name(), &theme_types);
ThemeContext *global_context = ThemeDB::get_singleton()->get_default_theme_context();
for (const Ref<Theme> &theme : global_context->get_themes()) {
List<Ref<Theme>> themes = global_context->get_themes();
if (Engine::get_singleton()->is_editor_hint()) {
themes.push_front(ThemeDB::get_singleton()->get_project_theme());
}
for (const Ref<Theme> &theme : themes) {
if (theme.is_null()) {
continue;
}