diff options
Diffstat (limited to 'scene')
-rw-r--r-- | scene/gui/label.cpp | 5 | ||||
-rw-r--r-- | scene/resources/default_theme/default_theme.cpp | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index b98caf3562..be73fd8f51 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -260,7 +260,8 @@ void Label::_notification(int p_what) { } } } - visible_glyphs = total_glyphs * percent_visible; + + visible_glyphs = MIN(total_glyphs, visible_chars); } Vector2 ofs; @@ -541,6 +542,8 @@ void Label::set_visible_characters(int p_amount) { visible_chars = p_amount; if (get_total_character_count() > 0) { percent_visible = (float)p_amount / (float)get_total_character_count(); + } else { + percent_visible = 1.0; } update(); } diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index a94209c75f..ddf1fc3db4 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -1017,7 +1017,7 @@ void make_default_theme(bool p_hidpi, Ref<Font> p_font) { Ref<StyleBox> default_style; Ref<Texture2D> default_icon; Ref<Font> default_font; - int default_font_size = 16; + int default_font_size = 14; if (p_font.is_valid()) { default_font = p_font; } else if (p_hidpi) { |