aboutsummaryrefslogtreecommitdiff
path: root/scene/gui/label.cpp
diff options
context:
space:
mode:
authorvolzhs2016-11-07 20:15:21 +0900
committervolzhs2016-11-07 20:15:21 +0900
commitc0e87f2a248af48b22f414ecc00df2631a715eac (patch)
tree93dd6759897ad32a53cce0602a6dad480e449441 /scene/gui/label.cpp
parentcdc4664226cdc397d054b7390d0f75028d40412c (diff)
downloadgodot-c0e87f2a248af48b22f414ecc00df2631a715eac.tar.gz
godot-c0e87f2a248af48b22f414ecc00df2631a715eac.tar.zst
godot-c0e87f2a248af48b22f414ecc00df2631a715eac.zip
Fix Label valign position
Fix #7055
Diffstat (limited to '')
-rw-r--r--scene/gui/label.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index 3b15776c5..f95b15102 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -118,19 +118,19 @@ void Label::_notification(int p_what) {
//nothing
} break;
case VALIGN_CENTER: {
- vbegin=(size.y - lines_visible * font_h) / 2;
+ vbegin=(size.y - (lines_visible * font_h - line_spacing)) / 2;
vsep=0;
} break;
case VALIGN_BOTTOM: {
- vbegin=size.y - lines_visible * font_h;
+ vbegin=size.y - (lines_visible * font_h - line_spacing);
vsep=0;
} break;
case VALIGN_FILL: {
vbegin=0;
if (lines_visible>1) {
- vsep=(size.y - lines_visible * font_h) / (lines_visible - 1);
+ vsep=(size.y - (lines_visible * font_h - line_spacing)) / (lines_visible - 1);
} else {
vsep=0;
}