From d1e4d6e997d2c2f753ee510fcd13dee08b214968 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 9 May 2015 18:29:55 -0300 Subject: [PATCH] -fix clip+center alignment on Button, fixes #1865 --- scene/gui/button.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scene/gui/button.cpp b/scene/gui/button.cpp index 57dd29ad07..5b837d699c 100644 --- a/scene/gui/button.cpp +++ b/scene/gui/button.cpp @@ -115,6 +115,8 @@ void Button::_notification(int p_what) { text_ofs.y+=style->get_offset().y; } break; case ALIGN_CENTER: { + if (text_ofs.x<0) + text_ofs.x=0; text_ofs+=icon_ofs; text_ofs+=style->get_offset(); } break;