1
0
mirror of https://github.com/bec-project/bec_widgets.git synced 2026-03-09 02:07:55 +01:00

refactor: fix formatting, running black 2026.1

This commit is contained in:
2026-03-06 12:45:54 +01:00
parent 875d79eb0d
commit 73908e661c
2 changed files with 8 additions and 16 deletions

View File

@@ -104,8 +104,7 @@ 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;
@@ -114,8 +113,7 @@ class OverviewWidget(QGroupBox):
{
border: none;
}
"""
)
""")
content_layout.setAlignment(Qt.AlignmentFlag.AlignCenter)
content.setFixedSize(400, 280)

View File

@@ -60,12 +60,10 @@ 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"""
self._card_frame.setStyleSheet(f"""
border: 1px solid {palette.mid().color().name()};
background: {palette.base().color().name()};
"""
)
""")
shadow = QGraphicsDropShadowEffect(self._card_frame)
shadow.setBlurRadius(18)
shadow.setOffset(0, 4)
@@ -83,12 +81,10 @@ class ExperimentMatCard(BECWidget, QWidget):
def apply_theme(self, theme: str):
palette = get_theme_palette()
self._card_frame.setStyleSheet(
f"""
self._card_frame.setStyleSheet(f"""
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())
@@ -102,13 +98,11 @@ 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)