Fix typo in constant
This commit is contained in:
@@ -37,7 +37,7 @@ from PyQt5.QtGui import QColor, QIcon, QPainter, QPainterPath, QPixmap, QPolygon
|
|||||||
from novelwriter import SHARED
|
from novelwriter import SHARED
|
||||||
from novelwriter.common import simplified
|
from novelwriter.common import simplified
|
||||||
from novelwriter.enum import nwStatusShape
|
from novelwriter.enum import nwStatusShape
|
||||||
from novelwriter.types import QtPaintAnitAlias, QtTransparent
|
from novelwriter.types import QtPaintAntiAlias, QtTransparent
|
||||||
|
|
||||||
if TYPE_CHECKING: # pragma: no cover
|
if TYPE_CHECKING: # pragma: no cover
|
||||||
from typing import TypeGuard # Requires Python 3.10
|
from typing import TypeGuard # Requires Python 3.10
|
||||||
@@ -195,7 +195,7 @@ class NWStatus:
|
|||||||
pixmap.fill(QtTransparent)
|
pixmap.fill(QtTransparent)
|
||||||
|
|
||||||
painter = QPainter(pixmap)
|
painter = QPainter(pixmap)
|
||||||
painter.setRenderHint(QtPaintAnitAlias)
|
painter.setRenderHint(QtPaintAntiAlias)
|
||||||
painter.fillPath(_SHAPES.getShape(shape), color)
|
painter.fillPath(_SHAPES.getShape(shape), color)
|
||||||
painter.end()
|
painter.end()
|
||||||
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ from PyQt5.QtWidgets import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
from novelwriter.types import (
|
from novelwriter.types import (
|
||||||
QtAlignLeft, QtMouseOver, QtNoBrush, QtNoPen, QtPaintAnitAlias,
|
QtAlignLeft, QtMouseOver, QtNoBrush, QtNoPen, QtPaintAntiAlias,
|
||||||
QtSizeExpanding, QtSizeFixed
|
QtSizeExpanding, QtSizeFixed
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ class _PagedToolButton(QToolButton):
|
|||||||
opt.initFrom(self)
|
opt.initFrom(self)
|
||||||
|
|
||||||
paint = QPainter(self)
|
paint = QPainter(self)
|
||||||
paint.setRenderHint(QtPaintAnitAlias, True)
|
paint.setRenderHint(QtPaintAntiAlias, True)
|
||||||
paint.setPen(QtNoPen)
|
paint.setPen(QtNoPen)
|
||||||
paint.setBrush(QtNoBrush)
|
paint.setBrush(QtNoBrush)
|
||||||
|
|
||||||
@@ -213,7 +213,7 @@ class _NPagedToolLabel(QLabel):
|
|||||||
label that matches the button style.
|
label that matches the button style.
|
||||||
"""
|
"""
|
||||||
paint = QPainter(self)
|
paint = QPainter(self)
|
||||||
paint.setRenderHint(QtPaintAnitAlias, True)
|
paint.setRenderHint(QtPaintAntiAlias, True)
|
||||||
paint.setPen(QtNoPen)
|
paint.setPen(QtNoPen)
|
||||||
|
|
||||||
width = self.width()
|
width = self.width()
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ from PyQt5.QtGui import QBrush, QColor, QPainter, QPaintEvent, QPen
|
|||||||
from PyQt5.QtWidgets import QProgressBar, QWidget
|
from PyQt5.QtWidgets import QProgressBar, QWidget
|
||||||
|
|
||||||
from novelwriter.types import (
|
from novelwriter.types import (
|
||||||
QtAlignCenter, QtPaintAnitAlias, QtRoundCap, QtSizeFixed, QtSolidLine,
|
QtAlignCenter, QtPaintAntiAlias, QtRoundCap, QtSizeFixed, QtSolidLine,
|
||||||
QtTransparent
|
QtTransparent
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ class NProgressCircle(QProgressBar):
|
|||||||
progress = 100.0*self.value()/self.maximum()
|
progress = 100.0*self.value()/self.maximum()
|
||||||
angle = ceil(16*3.6*progress)
|
angle = ceil(16*3.6*progress)
|
||||||
painter = QPainter(self)
|
painter = QPainter(self)
|
||||||
painter.setRenderHint(QtPaintAnitAlias, True)
|
painter.setRenderHint(QtPaintAntiAlias, True)
|
||||||
painter.setPen(self._dPen)
|
painter.setPen(self._dPen)
|
||||||
painter.setBrush(self._dBrush)
|
painter.setBrush(self._dBrush)
|
||||||
painter.drawEllipse(self._dRect)
|
painter.drawEllipse(self._dRect)
|
||||||
@@ -119,7 +119,7 @@ class NProgressSimple(QProgressBar):
|
|||||||
if (value := self.value()) > 0:
|
if (value := self.value()) > 0:
|
||||||
progress = ceil(self.width()*float(value)/self.maximum())
|
progress = ceil(self.width()*float(value)/self.maximum())
|
||||||
painter = QPainter(self)
|
painter = QPainter(self)
|
||||||
painter.setRenderHint(QtPaintAnitAlias, True)
|
painter.setRenderHint(QtPaintAntiAlias, True)
|
||||||
painter.setPen(self.palette().highlight().color())
|
painter.setPen(self.palette().highlight().color())
|
||||||
painter.setBrush(self.palette().highlight())
|
painter.setBrush(self.palette().highlight())
|
||||||
painter.drawRect(0, 0, progress, self.height())
|
painter.drawRect(0, 0, progress, self.height())
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ from PyQt5.QtWidgets import QAbstractButton, QWidget
|
|||||||
|
|
||||||
from novelwriter import CONFIG
|
from novelwriter import CONFIG
|
||||||
from novelwriter.enum import nwTrinary
|
from novelwriter.enum import nwTrinary
|
||||||
from novelwriter.types import QtBlack, QtPaintAnitAlias
|
from novelwriter.types import QtBlack, QtPaintAntiAlias
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ class StatusLED(QAbstractButton):
|
|||||||
def paintEvent(self, event: QPaintEvent) -> None:
|
def paintEvent(self, event: QPaintEvent) -> None:
|
||||||
"""Draw the LED."""
|
"""Draw the LED."""
|
||||||
painter = QPainter(self)
|
painter = QPainter(self)
|
||||||
painter.setRenderHint(QtPaintAnitAlias, True)
|
painter.setRenderHint(QtPaintAntiAlias, True)
|
||||||
painter.setPen(self.palette().windowText().color())
|
painter.setPen(self.palette().windowText().color())
|
||||||
painter.setBrush(self._color)
|
painter.setBrush(self._color)
|
||||||
painter.setOpacity(1.0)
|
painter.setOpacity(1.0)
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ from PyQt5.QtGui import QMouseEvent, QPainter, QPaintEvent, QResizeEvent
|
|||||||
from PyQt5.QtWidgets import QAbstractButton, QWidget
|
from PyQt5.QtWidgets import QAbstractButton, QWidget
|
||||||
|
|
||||||
from novelwriter import CONFIG, SHARED
|
from novelwriter import CONFIG, SHARED
|
||||||
from novelwriter.types import QtMouseLeft, QtNoPen, QtPaintAnitAlias, QtSizeFixed
|
from novelwriter.types import QtMouseLeft, QtNoPen, QtPaintAntiAlias, QtSizeFixed
|
||||||
|
|
||||||
|
|
||||||
class NSwitch(QAbstractButton):
|
class NSwitch(QAbstractButton):
|
||||||
@@ -90,7 +90,7 @@ class NSwitch(QAbstractButton):
|
|||||||
def paintEvent(self, event: QPaintEvent) -> None:
|
def paintEvent(self, event: QPaintEvent) -> None:
|
||||||
"""Drawing the switch itself."""
|
"""Drawing the switch itself."""
|
||||||
painter = QPainter(self)
|
painter = QPainter(self)
|
||||||
painter.setRenderHint(QtPaintAnitAlias, True)
|
painter.setRenderHint(QtPaintAntiAlias, True)
|
||||||
painter.setPen(QtNoPen)
|
painter.setPen(QtNoPen)
|
||||||
|
|
||||||
palette = self.palette()
|
palette = self.palette()
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ QtNoBrush = Qt.BrushStyle.NoBrush
|
|||||||
QtNoPen = Qt.PenStyle.NoPen
|
QtNoPen = Qt.PenStyle.NoPen
|
||||||
QtRoundCap = Qt.PenCapStyle.RoundCap
|
QtRoundCap = Qt.PenCapStyle.RoundCap
|
||||||
QtSolidLine = Qt.PenStyle.SolidLine
|
QtSolidLine = Qt.PenStyle.SolidLine
|
||||||
QtPaintAnitAlias = QPainter.RenderHint.Antialiasing
|
QtPaintAntiAlias = QPainter.RenderHint.Antialiasing
|
||||||
QtMouseOver = QStyle.StateFlag.State_MouseOver
|
QtMouseOver = QStyle.StateFlag.State_MouseOver
|
||||||
QtSelected = QStyle.StateFlag.State_Selected
|
QtSelected = QStyle.StateFlag.State_Selected
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user