diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-05-09 18:29:55 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-05-09 18:29:55 -0300 |
commit | d1e4d6e997d2c2f753ee510fcd13dee08b214968 (patch) | |
tree | c8736b779b58db4464994d4801b88b74e21a1568 /scene/gui | |
parent | e090c06ae27f737239ae7cf6f8c56747b47506bd (diff) |
-fix clip+center alignment on Button, fixes #1865
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/button.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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; |