fixed PlayBtn Position on startup

* fixed playBtn has a wrong Position on startup
This commit is contained in:
Jannik 2017-10-26 21:13:56 +02:00
parent f6778a320f
commit 8d759a724b
2 changed files with 10 additions and 3 deletions

View File

@ -1126,9 +1126,16 @@ public class MainWindowController {
}
void refreshplayBtnPosition() {
playBtn.setLayoutX((main.pane.getWidth()/2)-50);
totalPlaytimeBtn.setLayoutX((main.pane.getWidth()/2)-50-20.5-100);
lastTimePlayedBtn.setLayoutX((main.pane.getWidth()/2)+50+20.5);
double width;
if (mainAnchorPane.getWidth() < 10) {
width = mainAnchorPane.getPrefWidth();
} else {
width = mainAnchorPane.getWidth();
}
playBtn.setLayoutX((width/2)-50);
totalPlaytimeBtn.setLayoutX((width/2)-50-20.5-100);
lastTimePlayedBtn.setLayoutX((width/2)+50+20.5);
}
private void addCourseDescription(SmmdbApiDataType course) {