From eaea571c99c9e9620fafe5cf87b5470ed4efb296 Mon Sep 17 00:00:00 2001 From: wakonig_k Date: Mon, 9 Mar 2026 15:25:29 +0100 Subject: [PATCH] f - minor changes fixed the styling and avoid shadowing styles minor rewording --- .../bec_atlas_admin_view.py | 6 ++-- .../experiment_mat_card.py | 30 ++++++++++++------- .../experiment_selection.py | 6 ++-- 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/bec_widgets/widgets/services/bec_atlas_admin_view/bec_atlas_admin_view.py b/bec_widgets/widgets/services/bec_atlas_admin_view/bec_atlas_admin_view.py index 91cbf8fd..65d1d055 100644 --- a/bec_widgets/widgets/services/bec_atlas_admin_view/bec_atlas_admin_view.py +++ b/bec_widgets/widgets/services/bec_atlas_admin_view/bec_atlas_admin_view.py @@ -104,7 +104,8 @@ class OverviewWidget(QGroupBox): content_layout = QVBoxLayout(content) content.setFrameShape(QFrame.Shape.StyledPanel) content.setFrameShadow(QFrame.Shadow.Raised) - content.setStyleSheet(""" + content.setStyleSheet( + """ QFrame { border: 1px solid #cccccc; @@ -113,7 +114,8 @@ class OverviewWidget(QGroupBox): { border: none; } - """) + """ + ) content_layout.setAlignment(Qt.AlignmentFlag.AlignCenter) content.setFixedSize(400, 280) diff --git a/bec_widgets/widgets/services/bec_atlas_admin_view/experiment_selection/experiment_mat_card.py b/bec_widgets/widgets/services/bec_atlas_admin_view/experiment_selection/experiment_mat_card.py index e74d5f2f..ea0fc366 100644 --- a/bec_widgets/widgets/services/bec_atlas_admin_view/experiment_selection/experiment_mat_card.py +++ b/bec_widgets/widgets/services/bec_atlas_admin_view/experiment_selection/experiment_mat_card.py @@ -60,10 +60,14 @@ class ExperimentMatCard(BECWidget, QWidget): layout = QVBoxLayout(self._card_frame) self._card_frame.setSizePolicy(QSizePolicy.Preferred, QSizePolicy.Preferred) palette = get_theme_palette() - self._card_frame.setStyleSheet(f""" - border: 1px solid {palette.mid().color().name()}; - background: {palette.base().color().name()}; - """) + self._card_frame.setStyleSheet( + f""" + QFrame {{ + border: 1px solid {palette.mid().color().name()}; + background: {palette.base().color().name()}; + }} + """ + ) shadow = QGraphicsDropShadowEffect(self._card_frame) shadow.setBlurRadius(18) shadow.setOffset(0, 4) @@ -81,10 +85,14 @@ class ExperimentMatCard(BECWidget, QWidget): def apply_theme(self, theme: str): palette = get_theme_palette() - self._card_frame.setStyleSheet(f""" - border: 1px solid {palette.mid().color().name()}; - background: {palette.base().color().name()}; - """) + self._card_frame.setStyleSheet( + f""" + QFrame {{ + border: 1px solid {palette.mid().color().name()}; + background: {palette.base().color().name()}; + }} + """ + ) shadow = self._card_frame.graphicsEffect() if isinstance(shadow, QGraphicsDropShadowEffect): shadow.setColor(palette.shadow().color()) @@ -98,11 +106,13 @@ class ExperimentMatCard(BECWidget, QWidget): title_row = QHBoxLayout() self._card_title = BorderLessLabel(title, self._group_box) - self._card_title.setStyleSheet(""" + self._card_title.setStyleSheet( + """ border: none; font-size: 14px; font-weight: 600; - """) + """ + ) # Add title row and info button to QH layout, then add it to QV layout title_row.addWidget(self._card_title) diff --git a/bec_widgets/widgets/services/bec_atlas_admin_view/experiment_selection/experiment_selection.py b/bec_widgets/widgets/services/bec_atlas_admin_view/experiment_selection/experiment_selection.py index c664b553..da99973d 100644 --- a/bec_widgets/widgets/services/bec_atlas_admin_view/experiment_selection/experiment_selection.py +++ b/bec_widgets/widgets/services/bec_atlas_admin_view/experiment_selection/experiment_selection.py @@ -68,7 +68,7 @@ class ExperimentSelection(QWidget): self._enable_fuzzy_search: bool = True self._hidden_rows: set[int] = set() self._headers: dict[str, str] = { - "pgroup": "P-group", + "pgroup": "pgroup", "title": "Title", "name": "Name", "schedule_start": "Schedule (start)", @@ -87,7 +87,7 @@ class ExperimentSelection(QWidget): main_layout.addWidget(self._tabs, stretch=1) self._card_tab = ExperimentMatCard( - parent=self, show_activate_button=True, button_text="Activate Next Experiment" + parent=self, show_activate_button=True, button_text="Activate" ) self._card_tab.experiment_selected.connect(self._emit_selected_experiment) if self._next_experiment: @@ -206,7 +206,7 @@ class ExperimentSelection(QWidget): # Add side card for experiment details self._side_card = ExperimentMatCard( - parent=self, show_activate_button=True, button_text="Activate Next Experiment" + parent=self, show_activate_button=True, button_text="Activate" ) self._side_card.experiment_selected.connect(self._emit_selected_experiment) hor_layout.addWidget(self._side_card, stretch=2) # Ratio 5:2 between table and card