Further number formatting improvements

This commit is contained in:
Veronica K. B. Olsen
2020-10-08 00:06:17 +02:00
parent 214323fa6e
commit b40e4635d9
6 changed files with 19 additions and 24 deletions
+5 -4
View File
@@ -454,10 +454,11 @@ class GuiWritingStats(QDialog):
)
return False
ttWords = ttNovel + ttNotes
self.labelTotal.setText(self._formatTime(ttTime))
self.novelWords.setText("{:n}".format(ttNovel))
self.notesWords.setText("{:n}".format(ttNotes))
self.totalWords.setText("{:n}".format(ttNovel + ttNotes))
self.novelWords.setText(f"{ttNovel:n}")
self.notesWords.setText(f"{ttNotes:n}")
self.totalWords.setText(f"{ttWords:n}")
return True
@@ -544,7 +545,7 @@ class GuiWritingStats(QDialog):
newItem = QTreeWidgetItem()
newItem.setText(self.C_TIME, sStart)
newItem.setText(self.C_LENGTH, self._formatTime(sDiff))
newItem.setText(self.C_COUNT, "{:n}".format(nWords))
newItem.setText(self.C_COUNT, f"{nWords:n}")
if nWords > 0 and listMax > 0:
theBar = self.barImage.scaled(