summaryrefslogtreecommitdiffstats
path: root/scene/gui/label.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/label.cpp')
-rw-r--r--scene/gui/label.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index 1b48b9165d..9242105b47 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -31,7 +31,6 @@
#include "label.h"
#include "core/config/project_settings.h"
-#include "core/core_string_names.h"
#include "core/string/print_string.h"
#include "core/string/translation.h"
@@ -304,6 +303,9 @@ void Label::_update_visible() {
break;
}
}
+ if (minsize.height > 0) {
+ minsize.height -= line_spacing;
+ }
}
inline void draw_glyph(const Glyph &p_gl, const RID &p_canvas, const Color &p_font_color, const Vector2 &p_ofs) {
@@ -784,11 +786,11 @@ void Label::_invalidate() {
void Label::set_label_settings(const Ref<LabelSettings> &p_settings) {
if (settings != p_settings) {
if (settings.is_valid()) {
- settings->disconnect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Label::_invalidate));
+ settings->disconnect_changed(callable_mp(this, &Label::_invalidate));
}
settings = p_settings;
if (settings.is_valid()) {
- settings->connect(CoreStringNames::get_singleton()->changed, callable_mp(this, &Label::_invalidate), CONNECT_REFERENCE_COUNTED);
+ settings->connect_changed(callable_mp(this, &Label::_invalidate), CONNECT_REFERENCE_COUNTED);
}
_invalidate();
}