summaryrefslogtreecommitdiff
path: root/scene/gui/button.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/button.cpp')
-rw-r--r--scene/gui/button.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp
index 65e9cccd05..4ce3f18505 100644
--- a/scene/gui/button.cpp
+++ b/scene/gui/button.cpp
@@ -159,7 +159,11 @@ void Button::_notification(int p_what) {
switch (align) {
case ALIGN_LEFT: {
- text_ofs.x = style->get_margin(MARGIN_LEFT) + icon_ofs.x + _internal_margin[MARGIN_LEFT] + get_constant("hseparation");
+ if (_internal_margin[MARGIN_LEFT] > 0) {
+ text_ofs.x = style->get_margin(MARGIN_LEFT) + icon_ofs.x + _internal_margin[MARGIN_LEFT] + get_constant("hseparation");
+ } else {
+ text_ofs.x = style->get_margin(MARGIN_LEFT) + icon_ofs.x;
+ }
text_ofs.y += style->get_offset().y;
} break;
case ALIGN_CENTER: {