diff --git a/bec_widgets/applications/launch_window.py b/bec_widgets/applications/launch_window.py
index 4d1ef6b8..9c92673c 100644
--- a/bec_widgets/applications/launch_window.py
+++ b/bec_widgets/applications/launch_window.py
@@ -147,8 +147,7 @@ class LaunchTile(RoundedFrame):
# Action button
self.action_button = QPushButton("Open")
- self.action_button.setStyleSheet(
- """
+ self.action_button.setStyleSheet("""
QPushButton {
background-color: #007AFF;
border: none;
@@ -160,8 +159,7 @@ class LaunchTile(RoundedFrame):
QPushButton:hover {
background-color: #005BB5;
}
- """
- )
+ """)
self.layout.addWidget(self.action_button, alignment=Qt.AlignmentFlag.AlignCenter)
def _fit_label_to_width(self, label: QLabel, max_width: int, min_pt: int = 10):
diff --git a/bec_widgets/applications/navigation_centre/side_bar_components.py b/bec_widgets/applications/navigation_centre/side_bar_components.py
index 67bb7666..2f6505af 100644
--- a/bec_widgets/applications/navigation_centre/side_bar_components.py
+++ b/bec_widgets/applications/navigation_centre/side_bar_components.py
@@ -127,12 +127,10 @@ class NavigationItem(QWidget):
self._icon_size_expanded = QtCore.QSize(26, 26)
self.icon_btn.setIconSize(self._icon_size_collapsed)
# Remove QToolButton hover/pressed background/outline
- self.icon_btn.setStyleSheet(
- """
+ self.icon_btn.setStyleSheet("""
QToolButton:hover { background: transparent; border: none; }
QToolButton:pressed { background: transparent; border: none; }
- """
- )
+ """)
# Mini label below icon
self.mini_lbl = QLabel(self._mini_text, self)
diff --git a/bec_widgets/applications/views/device_manager_view/device_manager_dialogs/device_form_dialog.py b/bec_widgets/applications/views/device_manager_view/device_manager_dialogs/device_form_dialog.py
index 1f4b574f..11f5f701 100644
--- a/bec_widgets/applications/views/device_manager_view/device_manager_dialogs/device_form_dialog.py
+++ b/bec_widgets/applications/views/device_manager_view/device_manager_dialogs/device_form_dialog.py
@@ -31,7 +31,7 @@ logger = bec_logger.logger
class DeviceManagerOphydValidationDialog(QtWidgets.QDialog):
"""Popup dialog to test Ophyd device configurations interactively."""
- def __init__(self, parent=None, config: dict | None = None): # type:ignore
+ def __init__(self, parent=None, config: dict | None = None): # type: ignore
super().__init__(parent)
self.setWindowTitle("Device Manager Ophyd Test")
self._config_status = ConfigStatus.UNKNOWN.value
@@ -133,7 +133,7 @@ class DeviceFormDialog(QtWidgets.QDialog):
# validated: config_status, connection_status
accepted_data = QtCore.Signal(dict, int, int, str, str)
- def __init__(self, parent=None, add_btn_text: str = "Add Device"): # type:ignore
+ def __init__(self, parent=None, add_btn_text: str = "Add Device"): # type: ignore
super().__init__(parent)
# Track old device name if config is edited
self._old_device_name: str = ""
diff --git a/bec_widgets/applications/views/device_manager_view/device_manager_display_widget.py b/bec_widgets/applications/views/device_manager_view/device_manager_display_widget.py
index 45dfc5eb..d4d388a7 100644
--- a/bec_widgets/applications/views/device_manager_view/device_manager_display_widget.py
+++ b/bec_widgets/applications/views/device_manager_view/device_manager_display_widget.py
@@ -103,16 +103,14 @@ class CustomBusyWidget(QWidget):
button_width = int(button_height * aspect_ratio)
self.cancel_button.setFixedSize(button_width, button_height)
color = get_accent_colors()
- self.cancel_button.setStyleSheet(
- f"""
+ self.cancel_button.setStyleSheet(f"""
QPushButton {{
background-color: {color.emergency.name()};
color: white;
font-weight: 600;
border-radius: 6px;
}}
- """
- )
+ """)
# Layout
content_layout = QVBoxLayout(self)
@@ -128,12 +126,10 @@ class CustomBusyWidget(QWidget):
bg_color = color._colors.get("BG", None)
if bg_color is None: # Fallback if missing
bg_color = QColor(50, 50, 50, 255)
- self.setStyleSheet(
- f"""
+ self.setStyleSheet(f"""
background-color: {bg_color.name()};
border-radius: 12px;
- """
- )
+ """)
def _ui_scale(self) -> int:
parent = self.parent()
diff --git a/bec_widgets/utils/bec_login.py b/bec_widgets/utils/bec_login.py
index 6f75b51c..e9a2952b 100644
--- a/bec_widgets/utils/bec_login.py
+++ b/bec_widgets/utils/bec_login.py
@@ -20,15 +20,13 @@ class BECLogin(QWidget):
title = QLabel("Sign in", parent=self)
title.setAlignment(Qt.AlignmentFlag.AlignCenter)
- title.setStyleSheet(
- """
+ title.setStyleSheet("""
#QLabel
{
font-size: 18px;
font-weight: 600;
}
- """
- )
+ """)
self.username = QLineEdit(parent=self)
self.username.setPlaceholderText("Username")
@@ -57,13 +55,11 @@ class BECLogin(QWidget):
self.username.setFocus()
- self.setStyleSheet(
- """
+ self.setStyleSheet("""
QLineEdit {
padding: 8px;
}
- """
- )
+ """)
def _clear_password(self):
"""Clear the password field."""
diff --git a/bec_widgets/utils/guided_tour.py b/bec_widgets/utils/guided_tour.py
index f38e9903..78333f20 100644
--- a/bec_widgets/utils/guided_tour.py
+++ b/bec_widgets/utils/guided_tour.py
@@ -67,15 +67,13 @@ class TutorialOverlay(QWidget):
box = QFrame(self)
app = QApplication.instance()
bg_color = app.palette().window().color()
- box.setStyleSheet(
- f"""
+ box.setStyleSheet(f"""
QFrame {{
background-color: {bg_color.name()};
border-radius: 8px;
padding: 8px;
}}
- """
- )
+ """)
layout = QVBoxLayout(box)
# Top layout with close button (left) and step indicator (right)
diff --git a/bec_widgets/utils/round_frame.py b/bec_widgets/utils/round_frame.py
index f8399d1b..14722b85 100644
--- a/bec_widgets/utils/round_frame.py
+++ b/bec_widgets/utils/round_frame.py
@@ -69,13 +69,11 @@ class RoundedFrame(QFrame):
"""
Update the style of the frame based on the background color.
"""
- self.setStyleSheet(
- f"""
+ self.setStyleSheet(f"""
QFrame#roundedFrame {{
border-radius: {self._radius}px;
}}
- """
- )
+ """)
self.apply_plot_widget_style()
def apply_plot_widget_style(self, border: str = "none"):
diff --git a/bec_widgets/utils/toolbars/actions.py b/bec_widgets/utils/toolbars/actions.py
index f82753ff..e1cfa70f 100644
--- a/bec_widgets/utils/toolbars/actions.py
+++ b/bec_widgets/utils/toolbars/actions.py
@@ -599,16 +599,14 @@ class ExpandableMenuAction(ToolBarAction):
button.setIcon(QIcon(self.icon_path))
button.setText(self.tooltip)
button.setPopupMode(QToolButton.ToolButtonPopupMode.InstantPopup)
- button.setStyleSheet(
- """
+ button.setStyleSheet("""
QToolButton {
font-size: 14px;
}
QMenu {
font-size: 14px;
}
- """
- )
+ """)
menu = QMenu(button)
for action_container in self.actions.values():
action: QAction = action_container.action
diff --git a/bec_widgets/utils/toolbars/splitter.py b/bec_widgets/utils/toolbars/splitter.py
index 91805fc1..d2071172 100644
--- a/bec_widgets/utils/toolbars/splitter.py
+++ b/bec_widgets/utils/toolbars/splitter.py
@@ -106,8 +106,7 @@ class ResizableSpacer(QWidget):
self.setSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Fixed)
- self.setStyleSheet(
- """
+ self.setStyleSheet("""
ResizableSpacer {
background-color: transparent;
margin: 0px;
@@ -117,8 +116,7 @@ class ResizableSpacer(QWidget):
ResizableSpacer:hover {
background-color: rgba(100, 100, 200, 80);
}
- """
- )
+ """)
self.setContentsMargins(0, 0, 0, 0)
diff --git a/bec_widgets/utils/toolbars/toolbar.py b/bec_widgets/utils/toolbars/toolbar.py
index fc2ec7ad..4d322ba4 100644
--- a/bec_widgets/utils/toolbars/toolbar.py
+++ b/bec_widgets/utils/toolbars/toolbar.py
@@ -291,8 +291,7 @@ class ModularToolBar(QToolBar):
menu = QMenu(self)
theme = get_theme_name()
if theme == "dark":
- menu.setStyleSheet(
- """
+ menu.setStyleSheet("""
QMenu {
background-color: rgba(50, 50, 50, 0.9);
border: 1px solid rgba(255, 255, 255, 0.2);
@@ -300,12 +299,10 @@ class ModularToolBar(QToolBar):
QMenu::item:selected {
background-color: rgba(0, 0, 255, 0.2);
}
- """
- )
+ """)
else:
# Light theme styling
- menu.setStyleSheet(
- """
+ menu.setStyleSheet("""
QMenu {
background-color: rgba(255, 255, 255, 0.9);
border: 1px solid rgba(0, 0, 0, 0.2);
@@ -313,8 +310,7 @@ class ModularToolBar(QToolBar):
QMenu::item:selected {
background-color: rgba(0, 0, 255, 0.2);
}
- """
- )
+ """)
for ii, bundle in enumerate(self.shown_bundles):
self.handle_bundle_context_menu(menu, bundle)
if ii < len(self.shown_bundles) - 1:
diff --git a/bec_widgets/widgets/containers/auto_update/auto_updates.py b/bec_widgets/widgets/containers/auto_update/auto_updates.py
index c259bda1..95424c16 100644
--- a/bec_widgets/widgets/containers/auto_update/auto_updates.py
+++ b/bec_widgets/widgets/containers/auto_update/auto_updates.py
@@ -46,7 +46,7 @@ class AutoUpdates(BECMainWindow):
self.setCentralWidget(self.dock_area)
self._auto_update_selected_device: str | None = None
- self._default_dock = None # type:ignore
+ self._default_dock = None # type: ignore
self.current_widget: BECWidget | None = None
self.dock_name = None
self._enabled = True
@@ -63,7 +63,7 @@ class AutoUpdates(BECMainWindow):
Disconnect all connections for the auto updates.
"""
self.bec_dispatcher.disconnect_slot(
- self._on_scan_status, MessageEndpoints.scan_status() # type:ignore
+ self._on_scan_status, MessageEndpoints.scan_status() # type: ignore
)
@property
@@ -244,10 +244,10 @@ class AutoUpdates(BECMainWindow):
wf = self.set_dock_to_widget("Waveform")
# Get the scan report devices reported by the scan
- dev_x = info.scan_report_devices[0] # type:ignore
+ dev_x = info.scan_report_devices[0] # type: ignore
# For the y axis, get the selected device
- dev_y = self.get_selected_device(info.readout_priority["monitored"]) # type:ignore
+ dev_y = self.get_selected_device(info.readout_priority["monitored"]) # type: ignore
if not dev_y:
return
@@ -279,8 +279,8 @@ class AutoUpdates(BECMainWindow):
scatter = self.set_dock_to_widget("ScatterWaveform")
# Get the scan report devices reported by the scan
- dev_x, dev_y = info.scan_report_devices[0], info.scan_report_devices[1] # type:ignore
- dev_z = self.get_selected_device(info.readout_priority["monitored"]) # type:ignore
+ dev_x, dev_y = info.scan_report_devices[0], info.scan_report_devices[1] # type: ignore
+ dev_z = self.get_selected_device(info.readout_priority["monitored"]) # type: ignore
if None in (dev_x, dev_y, dev_z):
return
@@ -309,8 +309,8 @@ class AutoUpdates(BECMainWindow):
# If the scan report devices are empty, there is nothing we can do
if not info.scan_report_devices:
return
- dev_x = info.scan_report_devices[0] # type:ignore
- dev_y = self.get_selected_device(info.readout_priority["monitored"]) # type:ignore
+ dev_x = info.scan_report_devices[0] # type: ignore
+ dev_y = self.get_selected_device(info.readout_priority["monitored"]) # type: ignore
if not dev_y:
return
diff --git a/bec_widgets/widgets/containers/explorer/explorer.py b/bec_widgets/widgets/containers/explorer/explorer.py
index 25bff357..997648ef 100644
--- a/bec_widgets/widgets/containers/explorer/explorer.py
+++ b/bec_widgets/widgets/containers/explorer/explorer.py
@@ -101,14 +101,12 @@ class Explorer(BECWidget, QWidget):
palette = get_theme_palette()
separator_color = palette.mid().color()
- self.splitter.setStyleSheet(
- f"""
+ self.splitter.setStyleSheet(f"""
QSplitter::handle {{
height: 0.1px;
background-color: rgba({separator_color.red()}, {separator_color.green()}, {separator_color.blue()}, 60);
}}
- """
- )
+ """)
def _update_spacer(self) -> None:
"""Update the spacer size based on section states"""
diff --git a/bec_widgets/widgets/containers/main_window/addons/notification_center/notification_banner.py b/bec_widgets/widgets/containers/main_window/addons/notification_center/notification_banner.py
index a11d8465..4b99a48f 100644
--- a/bec_widgets/widgets/containers/main_window/addons/notification_center/notification_banner.py
+++ b/bec_widgets/widgets/containers/main_window/addons/notification_center/notification_banner.py
@@ -134,15 +134,13 @@ class NotificationToast(QFrame):
bg.setAlphaF(0.30)
icon_bg = bg.name(QtGui.QColor.HexArgb)
icon_btn.setFixedSize(40, 40)
- icon_btn.setStyleSheet(
- f"""
+ icon_btn.setStyleSheet(f"""
QToolButton {{
background: {icon_bg};
border: none;
border-radius: 20px; /* perfect circle */
}}
- """
- )
+ """)
title_lbl = QtWidgets.QLabel(self._title)
@@ -327,15 +325,13 @@ class NotificationToast(QFrame):
bg = QtGui.QColor(SEVERITY[value.value]["color"])
bg.setAlphaF(0.30)
icon_bg = bg.name(QtGui.QColor.HexArgb)
- self._icon_btn.setStyleSheet(
- f"""
+ self._icon_btn.setStyleSheet(f"""
QToolButton {{
background: {icon_bg};
border: none;
border-radius: 20px;
}}
- """
- )
+ """)
self.apply_theme(self._theme)
# keep injected gradient in sync
if getattr(self, "_hg_enabled", False):
@@ -391,8 +387,7 @@ class NotificationToast(QFrame):
card_bg.setAlphaF(0.88)
btn_hover = self._accent_color.name()
- self.setStyleSheet(
- f"""
+ self.setStyleSheet(f"""
#NotificationToast {{
background: {card_bg.name(QtGui.QColor.HexArgb)};
border-radius: 12px;
@@ -406,18 +401,15 @@ class NotificationToast(QFrame):
font-size: 14px;
}}
#NotificationToast QPushButton:hover {{ color: {btn_hover}; }}
- """
- )
+ """)
# traceback panel colours
trace_bg = "#1e1e1e" if theme == "dark" else "#f0f0f0"
- self.trace_view.setStyleSheet(
- f"""
+ self.trace_view.setStyleSheet(f"""
background:{trace_bg};
color:{palette['body']};
border:none;
border-radius:8px;
- """
- )
+ """)
# icon glyph vs badge background: darker badge, lighter icon in light mode
icon_fg = "#ffffff" if theme == "light" else self._accent_color.name()
@@ -438,15 +430,13 @@ class NotificationToast(QFrame):
else:
badge_bg.setAlphaF(0.30)
icon_bg = badge_bg.name(QtGui.QColor.HexArgb)
- self._icon_btn.setStyleSheet(
- f"""
+ self._icon_btn.setStyleSheet(f"""
QToolButton {{
background: {icon_bg};
border: none;
border-radius: 20px;
}}
- """
- )
+ """)
# stronger accent wash in light mode, slightly stronger in dark too
self._accent_alpha = 110 if theme == "light" else 60
@@ -593,8 +583,7 @@ class NotificationCentre(QScrollArea):
self.setWidgetResizable(True)
# transparent background so only the toast cards are visible
self.setAttribute(QtCore.Qt.WA_TranslucentBackground, True)
- self.setStyleSheet(
- """
+ self.setStyleSheet("""
#NotificationCentre { background: transparent; }
#NotificationCentre QScrollBar:vertical {
background: transparent;
@@ -610,8 +599,7 @@ class NotificationCentre(QScrollArea):
#NotificationCentre QScrollBar::sub-line:vertical { height: 0; }
#NotificationCentre QScrollBar::add-page:vertical,
#NotificationCentre QScrollBar::sub-page:vertical { background: transparent; }
- """
- )
+ """)
self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
self.setFrameShape(QtWidgets.QFrame.NoFrame)
self.setFixedWidth(fixed_width)
@@ -958,8 +946,7 @@ class NotificationIndicator(QWidget):
self._group.buttonToggled.connect(self._button_toggled)
# minimalistic look: no frames or backgrounds on the buttons
- self.setStyleSheet(
- """
+ self.setStyleSheet("""
QToolButton {
border: none;
background: transparent;
@@ -970,8 +957,7 @@ class NotificationIndicator(QWidget):
background: rgba(255, 255, 255, 40);
font-weight: 600;
}
- """
- )
+ """)
# initial state: none checked (auto‑dismiss behaviour)
for k in kinds:
diff --git a/bec_widgets/widgets/control/device_manager/components/available_device_resources/available_device_group.py b/bec_widgets/widgets/control/device_manager/components/available_device_resources/available_device_group.py
index 96759d7b..bf5746c9 100644
--- a/bec_widgets/widgets/control/device_manager/components/available_device_resources/available_device_group.py
+++ b/bec_widgets/widgets/control/device_manager/components/available_device_resources/available_device_group.py
@@ -51,8 +51,7 @@ class _DeviceEntryWidget(QFrame):
self.setToolTip(self._rich_text())
def _rich_text(self):
- return dedent(
- f"""
+ return dedent(f"""
{self._device_spec.name}:
| description: | {self._device_spec.description} |
| enabled: | {self._device_spec.enabled} |
| read only: | {self._device_spec.readOnly} |