Collect all alignment flags into a new types module
This commit is contained in:
@@ -29,6 +29,8 @@ from PyQt5.QtGui import QBrush, QColor, QPaintEvent, QPainter, QPen
|
||||
from PyQt5.QtCore import QRect, Qt
|
||||
from PyQt5.QtWidgets import QProgressBar, QSizePolicy, QWidget
|
||||
|
||||
from novelwriter.types import QtAlignCenter
|
||||
|
||||
|
||||
class NProgressCircle(QProgressBar):
|
||||
"""Extension: Circular Progress Widget
|
||||
@@ -94,7 +96,7 @@ class NProgressCircle(QProgressBar):
|
||||
painter.setPen(self._cPen)
|
||||
painter.drawArc(self._cRect, 90*16, -angle)
|
||||
painter.setPen(self._tColor)
|
||||
painter.drawText(self._cRect, Qt.AlignCenter, self._text or f"{progress:.1f} %")
|
||||
painter.drawText(self._cRect, QtAlignCenter, self._text or f"{progress:.1f} %")
|
||||
return
|
||||
|
||||
# END Class NProgressCircle
|
||||
|
||||
Reference in New Issue
Block a user