v0.9.2: fixed rare layout issues in styled buttons due to text tweaks

This commit is contained in:
Evan Debenham 2021-02-19 22:21:24 -05:00
parent 5f6285d3d2
commit a20df5c724
2 changed files with 1 additions and 3 deletions

View File

@ -282,8 +282,6 @@ public class NewsScene extends PixelScene {
@Override
protected void layout() {
text.maxWidth( (int)(width - icon.width() - bg.marginHor() - 2));
super.layout();
icon.x = x + bg.marginLeft() + (16-icon.width())/2f;

View File

@ -65,7 +65,7 @@ public class StyledButton extends Button {
if (icon != null) componentWidth += icon.width() + 2;
if (text != null && !text.text().equals("")){
text.maxWidth( (int)(width - componentWidth - 2) );
text.maxWidth( (int)(width - componentWidth - bg.marginHor() - 2));
componentWidth += text.width() + 2;
text.setPos(