Skip to content

Commit

Permalink
Merge pull request #86894 from jsjtxietian/merge-dafault-font
Browse files Browse the repository at this point in the history
In `merge_with` also merge some default fields of theme
  • Loading branch information
akien-mga committed Jan 9, 2024
2 parents a50a6b9 + 6f3568e commit 1d3f98a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions scene/resources/theme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 1d3f98a

Please sign in to comment.