From 6f3568e3db678f6847d4019f55aa606ffd3196ce Mon Sep 17 00:00:00 2001 From: jsjtxietian Date: Sun, 7 Jan 2024 01:24:21 +0800 Subject: [PATCH] In `merge_with` also merge some default fileds of theme --- scene/resources/theme.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scene/resources/theme.cpp b/scene/resources/theme.cpp index d57a0f6b387..5980d75b821 100644 --- a/scene/resources/theme.cpp +++ b/scene/resources/theme.cpp @@ -1613,6 +1613,17 @@ void Theme::merge_with(const Ref &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(); }