v0.9.2: fixed rare layout issues in styled buttons due to text tweaks
This commit is contained in:
parent
5f6285d3d2
commit
a20df5c724
|
@ -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;
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in New Issue
Block a user