v0.3.4: fixed a layout issue with icon titles
This commit is contained in:
parent
a4af888045
commit
12fb42e17f
|
@ -81,10 +81,10 @@ public class IconTitle extends Component {
|
||||||
imIcon.x = x;
|
imIcon.x = x;
|
||||||
imIcon.y = y;
|
imIcon.y = y;
|
||||||
|
|
||||||
|
tfLabel.maxWidth((int)(width - (imIcon.x + imIcon.width() + GAP)));
|
||||||
tfLabel.setPos(imIcon.x + imIcon.width() + GAP, imIcon.height > tfLabel.height() ?
|
tfLabel.setPos(imIcon.x + imIcon.width() + GAP, imIcon.height > tfLabel.height() ?
|
||||||
imIcon.y + (imIcon.height() - tfLabel.height()) / 2 :
|
imIcon.y + (imIcon.height() - tfLabel.height()) / 2 :
|
||||||
imIcon.y);
|
imIcon.y);
|
||||||
tfLabel.maxWidth((int)(width - tfLabel.left()));
|
|
||||||
|
|
||||||
if (health.visible) {
|
if (health.visible) {
|
||||||
health.setRect( tfLabel.left(), Math.max( tfLabel.top() + tfLabel.height(), imIcon.y + imIcon.height() - health.height() ), tfLabel.maxWidth(), 0 );
|
health.setRect( tfLabel.left(), Math.max( tfLabel.top() + tfLabel.height(), imIcon.y + imIcon.height() - health.height() ), tfLabel.maxWidth(), 0 );
|
||||||
|
|
Loading…
Reference in New Issue
Block a user