Update Qt namespace flags
This commit is contained in:
@@ -25,11 +25,11 @@ from __future__ import annotations
|
||||
|
||||
from math import ceil
|
||||
|
||||
from PyQt5.QtCore import QRect
|
||||
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
|
||||
from novelwriter.types import QtAlignCenter, QtRoundCap, QtSolidLine, QtTransparent
|
||||
|
||||
|
||||
class NProgressCircle(QProgressBar):
|
||||
@@ -50,8 +50,8 @@ class NProgressCircle(QProgressBar):
|
||||
self._point = point
|
||||
self._dRect = QRect(0, 0, size, size)
|
||||
self._cRect = QRect(point, point, size - 2*point, size - 2*point)
|
||||
self._dPen = QPen(Qt.transparent)
|
||||
self._dBrush = QBrush(Qt.transparent)
|
||||
self._dPen = QPen(QtTransparent)
|
||||
self._dBrush = QBrush(QtTransparent)
|
||||
self.setColours(
|
||||
track=self.palette().alternateBase().color(),
|
||||
bar=self.palette().highlight().color(),
|
||||
@@ -69,9 +69,9 @@ class NProgressCircle(QProgressBar):
|
||||
self._dPen = QPen(back)
|
||||
self._dBrush = QBrush(back)
|
||||
if isinstance(bar, QColor):
|
||||
self._cPen = QPen(QBrush(bar), self._point, Qt.SolidLine, Qt.RoundCap)
|
||||
self._cPen = QPen(QBrush(bar), self._point, QtSolidLine, QtRoundCap)
|
||||
if isinstance(track, QColor):
|
||||
self._bPen = QPen(QBrush(track), self._point, Qt.SolidLine, Qt.RoundCap)
|
||||
self._bPen = QPen(QBrush(track), self._point, QtSolidLine, QtRoundCap)
|
||||
if isinstance(text, QColor):
|
||||
self._tColor = text
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user