Merge pull request #90838 from bruvzg/btn_theme_rounding
[Button] Fix theme elements size rounding errors not keeping sufficient space for the text.
This commit is contained in:
commit
a202027efe
1 changed files with 1 additions and 1 deletions
|
@ -358,7 +358,7 @@ void Button::_notification(int p_what) {
|
||||||
if (!xl_text.is_empty()) {
|
if (!xl_text.is_empty()) {
|
||||||
text_buf->set_alignment(align_rtl_checked);
|
text_buf->set_alignment(align_rtl_checked);
|
||||||
|
|
||||||
float text_buf_width = MAX(1.0f, drawable_size_remained.width); // The space's width filled by the text_buf.
|
float text_buf_width = Math::ceil(MAX(1.0f, drawable_size_remained.width)); // The space's width filled by the text_buf.
|
||||||
text_buf->set_width(text_buf_width);
|
text_buf->set_width(text_buf_width);
|
||||||
|
|
||||||
Point2 text_ofs;
|
Point2 text_ofs;
|
||||||
|
|
Loading…
Reference in a new issue