summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2016-11-09 11:45:22 +0100
committerGitHub <noreply@github.com>2016-11-09 11:45:22 +0100
commitaa61e9b24280cb1fd81610b49a6738bf88a8976c (patch)
tree242cb004c026893b0fe85cb1c0b114dfe0667b9d
parent699ac17c53fe5b7318d653b4744b4dc6a1beb2d3 (diff)
parentc0e87f2a248af48b22f414ecc00df2631a715eac (diff)
Merge pull request #7060 from volzhs/label-valign
Fix Label valign position
-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 3b15776c55..f95b151024 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;
}