Complete the rewrite of the Preferences dialog
This commit is contained in:
+427
-702
File diff suppressed because it is too large
Load Diff
@@ -94,7 +94,7 @@ class NScrollableForm(QScrollArea):
|
||||
|
||||
def addRow(self, label: str, widget: QWidget, helpText: str = "", unit: str | None = None,
|
||||
button: QWidget | None = None, editable: str | None = None) -> None:
|
||||
"""Add a label and a widget as a new row of the grid."""
|
||||
"""Add a label and a widget as a new row of the form."""
|
||||
row = QHBoxLayout()
|
||||
|
||||
wSp = CONFIG.pxInt(8)
|
||||
|
||||
@@ -26,7 +26,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
from __future__ import annotations
|
||||
|
||||
from PyQt5.QtGui import QColor, QPaintEvent, QPainter, QPolygon
|
||||
from PyQt5.QtCore import QPoint, QRectF, Qt, pyqtSignal, pyqtSlot
|
||||
from PyQt5.QtCore import QPoint, QRectF, QSize, Qt, pyqtSignal, pyqtSlot
|
||||
from PyQt5.QtWidgets import (
|
||||
QAbstractButton, QAction, QButtonGroup, QLabel, QSizePolicy, QStyle,
|
||||
QStyleOptionToolButton, QToolBar, QToolButton, QWidget
|
||||
@@ -136,6 +136,10 @@ class _NPagedToolButton(QToolButton):
|
||||
|
||||
return
|
||||
|
||||
def sizeHint(self) -> QSize:
|
||||
"""Return a size hint that includes the arrow."""
|
||||
return super().sizeHint() + QSize(4*self._aH, 0)
|
||||
|
||||
def paintEvent(self, event: QPaintEvent) -> None:
|
||||
"""Overload the paint event to draw a simple, left aligned text
|
||||
label, with a highlight when selected and a transparent base
|
||||
|
||||
Reference in New Issue
Block a user