music selection ui layout edited

This commit is contained in:
Harrison Deng 2017-05-06 00:07:51 -05:00
parent 991ff711e6
commit c17b5c490a
2 changed files with 4 additions and 1 deletions

View File

@ -108,7 +108,7 @@ public class MusicSelectable extends Button implements Disposable {
defaults().align(Align.top);
add(displayName).expandX().fillX().padTop(15f).top();
add(displayName).expandX().fillX().padTop(10f).top().padBottom(10f);
row();
String formattedTime = "Run time: "+ String.valueOf(durationInSeconds/60) + ":";
@ -141,6 +141,7 @@ public class MusicSelectable extends Button implements Disposable {
if (albumWorkBytes != null && !invalidMusic) {
Pixmap albumArt = new Pixmap(albumWorkBytes, 0, albumWorkBytes.length);
albumCover = new Texture(albumArt);
imageIcon = new Image(albumCover);
albumArt.dispose();
@ -174,4 +175,5 @@ public class MusicSelectable extends Button implements Disposable {
public void dispose() {
albumCover.dispose();
}
}

View File

@ -73,6 +73,7 @@ public class ScrollText extends Widget {
@Override
public void layout() {
setHeight(fontHeight+4);
clipBounds.set(getParent().getX()+getX()-scrollCoords.getVisualScrollX(), getParent().getY()+getY(), getWidth(), getHeight());
super.layout();
}