Merge pull request #86894 from jsjtxietian/merge-dafault-font

In `merge_with` also merge some default fields of theme
This commit is contained in:
Rémi Verschelde 2024-01-09 11:29:52 +01:00
commit 1d3f98ac6a
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 11 additions and 0 deletions

View File

@ -1613,6 +1613,17 @@ void Theme::merge_with(const Ref<Theme> &p_other) {
}
}
// Defaults.
if (p_other->has_default_font()) {
set_default_font(p_other->default_font);
}
if (p_other->has_default_font_size()) {
set_default_font_size(p_other->default_font_size);
}
if (p_other->has_default_base_scale()) {
set_default_base_scale(p_other->default_base_scale);
}
_unfreeze_and_propagate_changes();
}