style: clear the two portrait-mode diff-gate violations
The sample-name labels are created in __init__ now (the build helper only styles and mounts them) so reportUninitializedInstanceVariable stops firing on the ported styling lines, and the queue placeholder uses the scoped Qt.AlignmentFlag.AlignCenter. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -257,6 +257,12 @@ class PortraitModePanel(QWidget):
|
||||
self.setMaximumWidth(self.PORTRAIT_WIDTH)
|
||||
self.setSizePolicy(QSizePolicy.Fixed, QSizePolicy.Expanding)
|
||||
|
||||
# Created here rather than in the build helper so the attributes are
|
||||
# initialized in __init__ (basedpyright gate); the helper styles and
|
||||
# mounts them.
|
||||
self._name_lbl = QLabel("—")
|
||||
self._sub_lbl = QLabel("No sample queued")
|
||||
|
||||
self._job_list_panel = None
|
||||
self._tell_samples = None
|
||||
self._is_running = False
|
||||
@@ -350,10 +356,8 @@ class PortraitModePanel(QWidget):
|
||||
cam_card_layout.addWidget(cam_widget)
|
||||
layout.addWidget(cam_card)
|
||||
|
||||
# Sample name labels
|
||||
self._name_lbl = QLabel("—")
|
||||
# Sample name labels (created in __init__)
|
||||
self._name_lbl.setStyleSheet(f"color: {TEXT}; font-size: {FONT_VALUE}; font-weight: 700;")
|
||||
self._sub_lbl = QLabel("No sample queued")
|
||||
self._sub_lbl.setStyleSheet(f"color: {SUBTEXT}; font-size: {FONT_HINT};")
|
||||
layout.addWidget(self._name_lbl)
|
||||
layout.addWidget(self._sub_lbl)
|
||||
@@ -606,7 +610,7 @@ class PortraitModePanel(QWidget):
|
||||
placeholder.setStyleSheet(
|
||||
f"color: {SUBTEXT}; font-size: {FONT_LABEL}; font-weight: 700;"
|
||||
)
|
||||
placeholder.setAlignment(Qt.AlignCenter)
|
||||
placeholder.setAlignment(Qt.AlignmentFlag.AlignCenter)
|
||||
self._queue_inner_layout.addWidget(placeholder)
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user