From 2109f88816d89aefb426af809bad4ef8b56eaa20 Mon Sep 17 00:00:00 2001 From: Olivier Keshavjee Date: Tue, 14 Nov 2017 10:36:57 +0100 Subject: [PATCH] Improves colors of goal progress bar --- manuskript/functions.py | 3 ++- manuskript/ui/editors/mainEditor.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/manuskript/functions.py b/manuskript/functions.py index cdcd8ca0..8931cc62 100644 --- a/manuskript/functions.py +++ b/manuskript/functions.py @@ -47,8 +47,9 @@ def toString(text): def drawProgress(painter, rect, progress, radius=0): + from manuskript.ui import style as S painter.setPen(Qt.NoPen) - painter.setBrush(QColor("#dddddd")) + painter.setBrush(QColor(S.base)) # "#dddddd" painter.drawRoundedRect(rect, radius, radius) painter.setBrush(QBrush(colorFromProgress(progress))) diff --git a/manuskript/ui/editors/mainEditor.py b/manuskript/ui/editors/mainEditor.py index 606c4668..d410e287 100644 --- a/manuskript/ui/editors/mainEditor.py +++ b/manuskript/ui/editors/mainEditor.py @@ -317,12 +317,12 @@ class mainEditor(QWidget, Ui_mainEditor): drawProgress(p, rect, progress, 2) del p self.lblRedacProgress.setPixmap(self.px) - self.lblRedacWC.setText(self.tr("{} words / {}").format( + self.lblRedacWC.setText(self.tr("{} words / {} ").format( locale.format("%d", wc, grouping=True), locale.format("%d", goal, grouping=True))) else: self.lblRedacProgress.hide() - self.lblRedacWC.setText(self.tr("{} words").format( + self.lblRedacWC.setText(self.tr("{} words ").format( locale.format("%d", wc, grouping=True))) ###############################################################################