Clean up a lot more namespace flags

This commit is contained in:
Veronica Berglyd Olsen
2024-04-03 20:25:54 +02:00
parent 46c5f1c10d
commit 20c5993e2d
38 changed files with 184 additions and 142 deletions
+3 -1
View File
@@ -28,6 +28,8 @@ from math import ceil
from PyQt5.QtGui import QPaintEvent, QPainter
from PyQt5.QtWidgets import QProgressBar, QWidget
from novelwriter.types import QtPaintAnitAlias
class NProgressSimple(QProgressBar):
"""Extension: Simple Progress Widget
@@ -44,7 +46,7 @@ class NProgressSimple(QProgressBar):
if (value := self.value()) > 0:
progress = ceil(self.width()*float(value)/self.maximum())
painter = QPainter(self)
painter.setRenderHint(QPainter.Antialiasing, True)
painter.setRenderHint(QtPaintAnitAlias, True)
painter.setPen(self.palette().highlight().color())
painter.setBrush(self.palette().highlight())
painter.drawRect(0, 0, progress, self.height())