From fbe5b3fa30e6b9b9473c72d06d653851f15442d7 Mon Sep 17 00:00:00 2001 From: aj Date: Thu, 2 May 2019 11:35:46 +0100 Subject: [PATCH] minor ui changes, number formatting and button width --- .../fmframework/fx/controller/AlbumPaneController.java | 2 +- .../fmframework/fx/controller/FMObjListPaneController.java | 6 +++--- .../fx/controller/FMObjListPaneEditController.java | 4 ++-- .../resources/sarsoo/fmframework/fx/ui/FMObjListPane.fxml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/sarsoo/fmframework/fx/controller/AlbumPaneController.java b/src/main/java/sarsoo/fmframework/fx/controller/AlbumPaneController.java index 29d0a5b..b811924 100644 --- a/src/main/java/sarsoo/fmframework/fx/controller/AlbumPaneController.java +++ b/src/main/java/sarsoo/fmframework/fx/controller/AlbumPaneController.java @@ -53,7 +53,7 @@ public class AlbumPaneController { this.album = album; - NumberFormat numberFormat = NumberFormat.getNumberInstance(Locale.US); + NumberFormat numberFormat = NumberFormat.getNumberInstance(Locale.UK); labelAlbumName.setText(album.getName()); labelArtistName.setText(album.getArtist().getName()); diff --git a/src/main/java/sarsoo/fmframework/fx/controller/FMObjListPaneController.java b/src/main/java/sarsoo/fmframework/fx/controller/FMObjListPaneController.java index 7addae7..3ee9c14 100644 --- a/src/main/java/sarsoo/fmframework/fx/controller/FMObjListPaneController.java +++ b/src/main/java/sarsoo/fmframework/fx/controller/FMObjListPaneController.java @@ -52,7 +52,7 @@ public class FMObjListPaneController { double percent = Maths.getPercentListening(list, Reference.getUserName()); NumberFormat numberFormat = NumberFormat.getNumberInstance(Locale.US); - labelTotalScrobbles.setText("" + list.getTotalUserScrobbles()); + labelTotalScrobbles.setText(numberFormat.format(list.getTotalUserScrobbles())); labelPercent.setText(String.format("%.2f%%", percent)); Collections.sort(list); @@ -127,9 +127,9 @@ public class FMObjListPaneController { 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)); Collections.sort(list); diff --git a/src/main/java/sarsoo/fmframework/fx/controller/FMObjListPaneEditController.java b/src/main/java/sarsoo/fmframework/fx/controller/FMObjListPaneEditController.java index 8610016..9e33c44 100644 --- a/src/main/java/sarsoo/fmframework/fx/controller/FMObjListPaneEditController.java +++ b/src/main/java/sarsoo/fmframework/fx/controller/FMObjListPaneEditController.java @@ -155,9 +155,9 @@ public class FMObjListPaneEditController { public void refresh() { 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)); Collections.sort(list); diff --git a/src/main/resources/sarsoo/fmframework/fx/ui/FMObjListPane.fxml b/src/main/resources/sarsoo/fmframework/fx/ui/FMObjListPane.fxml index 58da38c..cdd1d59 100644 --- a/src/main/resources/sarsoo/fmframework/fx/ui/FMObjListPane.fxml +++ b/src/main/resources/sarsoo/fmframework/fx/ui/FMObjListPane.fxml @@ -47,7 +47,7 @@