minor ui changes, number formatting and button width

This commit is contained in:
aj 2019-05-02 11:35:46 +01:00
parent a98fa05b8f
commit fbe5b3fa30
4 changed files with 7 additions and 7 deletions

View File

@ -53,7 +53,7 @@ public class AlbumPaneController {
this.album = album; this.album = album;
NumberFormat numberFormat = NumberFormat.getNumberInstance(Locale.US); NumberFormat numberFormat = NumberFormat.getNumberInstance(Locale.UK);
labelAlbumName.setText(album.getName()); labelAlbumName.setText(album.getName());
labelArtistName.setText(album.getArtist().getName()); labelArtistName.setText(album.getArtist().getName());

View File

@ -52,7 +52,7 @@ public class FMObjListPaneController {
double percent = Maths.getPercentListening(list, Reference.getUserName()); double percent = Maths.getPercentListening(list, Reference.getUserName());
NumberFormat numberFormat = NumberFormat.getNumberInstance(Locale.US); NumberFormat numberFormat = NumberFormat.getNumberInstance(Locale.US);
labelTotalScrobbles.setText("" + list.getTotalUserScrobbles()); labelTotalScrobbles.setText(numberFormat.format(list.getTotalUserScrobbles()));
labelPercent.setText(String.format("%.2f%%", percent)); labelPercent.setText(String.format("%.2f%%", percent));
Collections.sort(list); Collections.sort(list);
@ -127,9 +127,9 @@ public class FMObjListPaneController {
double percent = Maths.getPercentListening(list, Reference.getUserName()); double percent = Maths.getPercentListening(list, Reference.getUserName());
NumberFormat numberFormat = NumberFormat.getNumberInstance(Locale.US); NumberFormat numberFormat = NumberFormat.getNumberInstance(Locale.UK);
labelTotalScrobbles.setText("Σ " + list.getTotalUserScrobbles()); labelTotalScrobbles.setText(numberFormat.format(list.getTotalUserScrobbles()));
labelPercent.setText(String.format("%.2f%%", percent)); labelPercent.setText(String.format("%.2f%%", percent));
Collections.sort(list); Collections.sort(list);

View File

@ -155,9 +155,9 @@ public class FMObjListPaneEditController {
public void refresh() { public void refresh() {
double percent = Maths.getPercentListening(list, Reference.getUserName()); double percent = Maths.getPercentListening(list, Reference.getUserName());
NumberFormat numberFormat = NumberFormat.getNumberInstance(Locale.US); NumberFormat numberFormat = NumberFormat.getNumberInstance(Locale.UK);
labelTotalScrobbles.setText("" + list.getTotalUserScrobbles()); labelTotalScrobbles.setText(numberFormat.format(list.getTotalUserScrobbles()));
labelPercent.setText(String.format("%.2f%%", percent)); labelPercent.setText(String.format("%.2f%%", percent));
Collections.sort(list); Collections.sort(list);

View File

@ -47,7 +47,7 @@
<children> <children>
<Label fx:id="labelTotalScrobbles" styleClass="stats" text="Label" GridPane.halignment="CENTER" /> <Label fx:id="labelTotalScrobbles" styleClass="stats" text="Label" GridPane.halignment="CENTER" />
<Label fx:id="labelPercent" styleClass="stats" text="Label" GridPane.columnIndex="1" GridPane.halignment="CENTER" /> <Label fx:id="labelPercent" styleClass="stats" text="Label" GridPane.columnIndex="1" GridPane.halignment="CENTER" />
<Button fx:id="buttonRefresh" contentDisplay="CENTER" mnemonicParsing="false" onAction="#handleRefresh" prefHeight="25.0" prefWidth="57.0" text="refresh" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.hgrow="ALWAYS" /> <Button fx:id="buttonRefresh" contentDisplay="CENTER" mnemonicParsing="false" onAction="#handleRefresh" prefHeight="25.0" prefWidth="97.0" text="refresh" GridPane.columnIndex="2" GridPane.halignment="CENTER" GridPane.hgrow="ALWAYS" />
</children> </children>
</GridPane> </GridPane>
</children> </children>