Collect all alignment flags into a new types module

This commit is contained in:
Veronica Berglyd Olsen
2024-04-01 18:27:18 +02:00
parent 468a0e7416
commit c3467d89c2
24 changed files with 195 additions and 171 deletions
+4 -2
View File
@@ -32,6 +32,8 @@ from PyQt5.QtWidgets import (
QStyleOptionToolButton, QToolBar, QToolButton, QWidget
)
from novelwriter.types import QtAlignLeft
class NPagedSideBar(QToolBar):
"""Extensions: Paged Side Bar
@@ -171,7 +173,7 @@ class _NPagedToolButton(QToolButton):
paint.setPen(textCol)
paint.setOpacity(1.0)
paint.drawText(QRectF(self._lM, self._tM, tW, tH), Qt.AlignLeft, self.text())
paint.drawText(QRectF(self._lM, self._tM, tW, tH), QtAlignLeft, self.text())
tC = self.height()//2
tW = self.width() - self._aH - self._lM
@@ -223,7 +225,7 @@ class _NPagedToolLabel(QLabel):
paint.setPen(self._textCol)
paint.setOpacity(1.0)
paint.drawText(QRectF(self._lM, self._tM, tW, tH), Qt.AlignLeft, self.text())
paint.drawText(QRectF(self._lM, self._tM, tW, tH), QtAlignLeft, self.text())
return