mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-06-13 16:34:34 +12:00
Improves colors of goal progress bar
This commit is contained in:
parent
845aa8b205
commit
2109f88816
|
@ -47,8 +47,9 @@ def toString(text):
|
||||||
|
|
||||||
|
|
||||||
def drawProgress(painter, rect, progress, radius=0):
|
def drawProgress(painter, rect, progress, radius=0):
|
||||||
|
from manuskript.ui import style as S
|
||||||
painter.setPen(Qt.NoPen)
|
painter.setPen(Qt.NoPen)
|
||||||
painter.setBrush(QColor("#dddddd"))
|
painter.setBrush(QColor(S.base)) # "#dddddd"
|
||||||
painter.drawRoundedRect(rect, radius, radius)
|
painter.drawRoundedRect(rect, radius, radius)
|
||||||
|
|
||||||
painter.setBrush(QBrush(colorFromProgress(progress)))
|
painter.setBrush(QBrush(colorFromProgress(progress)))
|
||||||
|
|
|
@ -317,12 +317,12 @@ class mainEditor(QWidget, Ui_mainEditor):
|
||||||
drawProgress(p, rect, progress, 2)
|
drawProgress(p, rect, progress, 2)
|
||||||
del p
|
del p
|
||||||
self.lblRedacProgress.setPixmap(self.px)
|
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", wc, grouping=True),
|
||||||
locale.format("%d", goal, grouping=True)))
|
locale.format("%d", goal, grouping=True)))
|
||||||
else:
|
else:
|
||||||
self.lblRedacProgress.hide()
|
self.lblRedacProgress.hide()
|
||||||
self.lblRedacWC.setText(self.tr("{} words").format(
|
self.lblRedacWC.setText(self.tr("{} words ").format(
|
||||||
locale.format("%d", wc, grouping=True)))
|
locale.format("%d", wc, grouping=True)))
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
Loading…
Reference in a new issue