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 -2
View File
@@ -35,6 +35,7 @@ from PyQt5.QtCore import QRectF
from novelwriter import CONFIG
from novelwriter.common import minmax, simplified
from novelwriter.types import QtPaintAnitAlias, QtTransparent
if TYPE_CHECKING: # pragma: no cover
from typing import TypeGuard # Requires Python 3.10
@@ -248,10 +249,10 @@ class NWStatus:
def _createIcon(self, red: int, green: int, blue: int) -> QIcon:
"""Generate an icon for a status label."""
pixmap = QPixmap(self._iPX, self._iPX)
pixmap.fill(QColor(0, 0, 0, 0))
pixmap.fill(QtTransparent)
painter = QPainter(pixmap)
painter.setRenderHint(QPainter.Antialiasing)
painter.setRenderHint(QtPaintAnitAlias)
painter.fillPath(self._iconPath, QColor(red, green, blue))
painter.end()