|
|
@@ -63,6 +63,229 @@ QToolBar {{
|
|
|
}}
|
|
|
"""
|
|
|
|
|
|
+# Global dark stylesheet — scanning-tab palette applied across every widget.
|
|
|
+_GLOBAL_CSS = """
|
|
|
+QWidget {
|
|
|
+ background-color: #1a1a2e;
|
|
|
+ color: #ddddff;
|
|
|
+ font-size: 11px;
|
|
|
+}
|
|
|
+QMainWindow { background-color: #0f0f1e; }
|
|
|
+QDialog { background-color: #1a1a2e; }
|
|
|
+
|
|
|
+/* ── group boxes ── */
|
|
|
+QGroupBox {
|
|
|
+ background: #1e1e38;
|
|
|
+ border: 1px solid #333355;
|
|
|
+ border-radius: 3px;
|
|
|
+ margin-top: 16px;
|
|
|
+ padding-top: 8px;
|
|
|
+ color: #8888aa;
|
|
|
+ font-size: 10px;
|
|
|
+}
|
|
|
+QGroupBox::title {
|
|
|
+ subcontrol-origin: margin;
|
|
|
+ subcontrol-position: top left;
|
|
|
+ left: 8px;
|
|
|
+ top: 2px;
|
|
|
+ color: #8888aa;
|
|
|
+}
|
|
|
+
|
|
|
+/* ── buttons ── */
|
|
|
+QPushButton {
|
|
|
+ background: #252535;
|
|
|
+ color: #ccccee;
|
|
|
+ border: 1px solid #333355;
|
|
|
+ border-radius: 3px;
|
|
|
+ padding: 4px 10px;
|
|
|
+ min-height: 22px;
|
|
|
+}
|
|
|
+QPushButton:hover { background: #2a2a4a; border-color: #444466; }
|
|
|
+QPushButton:pressed { background: #1e1e38; border-color: #f0c040; }
|
|
|
+QPushButton:disabled { background: #1e1e2e; color: #555577; border-color: #2a2a3a; }
|
|
|
+QPushButton:checked {
|
|
|
+ background: #1e1e38;
|
|
|
+ color: #ffffff;
|
|
|
+ border-bottom: 2px solid #f0c040;
|
|
|
+}
|
|
|
+
|
|
|
+/* ── text inputs ── */
|
|
|
+QLineEdit, QTextEdit, QPlainTextEdit {
|
|
|
+ background: #16162a;
|
|
|
+ color: #ddddff;
|
|
|
+ border: 1px solid #333355;
|
|
|
+ border-radius: 2px;
|
|
|
+ padding: 2px 4px;
|
|
|
+ selection-background-color: #e65100;
|
|
|
+ selection-color: #ffffff;
|
|
|
+}
|
|
|
+QLineEdit:focus, QTextEdit:focus, QPlainTextEdit:focus { border-color: #f0c040; }
|
|
|
+
|
|
|
+/* ── spin boxes ── */
|
|
|
+QSpinBox, QDoubleSpinBox {
|
|
|
+ background: #16162a;
|
|
|
+ color: #ddddff;
|
|
|
+ border: 1px solid #333355;
|
|
|
+ border-radius: 2px;
|
|
|
+ padding: 2px 4px;
|
|
|
+}
|
|
|
+QSpinBox:focus, QDoubleSpinBox:focus { border-color: #f0c040; }
|
|
|
+QSpinBox::up-button, QDoubleSpinBox::up-button,
|
|
|
+QSpinBox::down-button, QDoubleSpinBox::down-button {
|
|
|
+ background: #252535;
|
|
|
+ border: none;
|
|
|
+ width: 14px;
|
|
|
+}
|
|
|
+QSpinBox::up-button:hover, QDoubleSpinBox::up-button:hover,
|
|
|
+QSpinBox::down-button:hover, QDoubleSpinBox::down-button:hover {
|
|
|
+ background: #2a2a4a;
|
|
|
+}
|
|
|
+
|
|
|
+/* ── combo boxes ── */
|
|
|
+QComboBox {
|
|
|
+ background: #252535;
|
|
|
+ color: #ccccee;
|
|
|
+ border: 1px solid #333355;
|
|
|
+ border-radius: 2px;
|
|
|
+ padding: 2px 4px;
|
|
|
+ min-height: 22px;
|
|
|
+}
|
|
|
+QComboBox:hover { border-color: #444466; }
|
|
|
+QComboBox:focus { border-color: #f0c040; }
|
|
|
+QComboBox::drop-down { border: none; width: 20px; }
|
|
|
+QComboBox QAbstractItemView {
|
|
|
+ background: #16162a;
|
|
|
+ color: #ddddff;
|
|
|
+ border: 1px solid #333355;
|
|
|
+ selection-background-color: #e65100;
|
|
|
+ selection-color: #ffffff;
|
|
|
+}
|
|
|
+
|
|
|
+/* ── tables ── */
|
|
|
+QTableWidget, QTableView {
|
|
|
+ background: #16162a;
|
|
|
+ color: #ddddff;
|
|
|
+ gridline-color: #333355;
|
|
|
+ border: 1px solid #2a2a4a;
|
|
|
+ selection-background-color: #252545;
|
|
|
+ selection-color: #ffffff;
|
|
|
+ alternate-background-color: #1e1e38;
|
|
|
+}
|
|
|
+QHeaderView::section {
|
|
|
+ background: #252535;
|
|
|
+ color: #aaaaaa;
|
|
|
+ border: 1px solid #333355;
|
|
|
+ padding: 4px;
|
|
|
+ font-size: 10px;
|
|
|
+}
|
|
|
+QHeaderView::section:hover { background: #2a2a4a; }
|
|
|
+QHeaderView { background: #252535; }
|
|
|
+
|
|
|
+/* ── list widgets ── */
|
|
|
+QListWidget {
|
|
|
+ background: #16162a;
|
|
|
+ color: #ddddff;
|
|
|
+ border: 1px solid #2a2a4a;
|
|
|
+}
|
|
|
+QListWidget::item { padding: 2px; }
|
|
|
+QListWidget::item:selected { background: #e65100; color: #ffffff; }
|
|
|
+QListWidget::item:hover { background: #252545; }
|
|
|
+
|
|
|
+/* ── scroll bars ── */
|
|
|
+QScrollArea { background: #1a1a2e; border: none; }
|
|
|
+QScrollBar:vertical {
|
|
|
+ background: #16162a;
|
|
|
+ width: 8px;
|
|
|
+ border: none;
|
|
|
+}
|
|
|
+QScrollBar::handle:vertical {
|
|
|
+ background: #444466;
|
|
|
+ border-radius: 4px;
|
|
|
+ min-height: 20px;
|
|
|
+}
|
|
|
+QScrollBar::handle:vertical:hover { background: #f0c040; }
|
|
|
+QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical { height: 0; }
|
|
|
+QScrollBar:horizontal {
|
|
|
+ background: #16162a;
|
|
|
+ height: 8px;
|
|
|
+ border: none;
|
|
|
+}
|
|
|
+QScrollBar::handle:horizontal {
|
|
|
+ background: #444466;
|
|
|
+ border-radius: 4px;
|
|
|
+ min-width: 20px;
|
|
|
+}
|
|
|
+QScrollBar::handle:horizontal:hover { background: #f0c040; }
|
|
|
+QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal { width: 0; }
|
|
|
+
|
|
|
+/* ── splitters ── */
|
|
|
+QSplitter::handle { background: #2a2a4a; }
|
|
|
+QSplitter::handle:horizontal { width: 4px; }
|
|
|
+QSplitter::handle:vertical { height: 4px; }
|
|
|
+QSplitter::handle:hover { background: #f0c040; }
|
|
|
+
|
|
|
+/* ── inner tab widgets ── */
|
|
|
+QTabWidget::pane { background: #1a1a2e; border: 1px solid #333355; }
|
|
|
+QTabBar::tab {
|
|
|
+ background: #1e1e38;
|
|
|
+ color: #555577;
|
|
|
+ border: 1px solid #333355;
|
|
|
+ padding: 4px 12px;
|
|
|
+ min-width: 80px;
|
|
|
+}
|
|
|
+QTabBar::tab:selected { background: #252545; color: #ffffff; border-bottom: 2px solid #f0c040; }
|
|
|
+QTabBar::tab:hover:!selected { background: #222240; color: #aaaacc; }
|
|
|
+
|
|
|
+/* ── progress bars ── */
|
|
|
+QProgressBar {
|
|
|
+ background: #16162a;
|
|
|
+ border: 1px solid #333355;
|
|
|
+ border-radius: 2px;
|
|
|
+ text-align: center;
|
|
|
+ color: #ddddff;
|
|
|
+ max-height: 12px;
|
|
|
+}
|
|
|
+QProgressBar::chunk { background: #f0c040; border-radius: 2px; }
|
|
|
+
|
|
|
+/* ── labels ── */
|
|
|
+QLabel { background: transparent; color: #aaaaaa; }
|
|
|
+
|
|
|
+/* ── frames / separators ── */
|
|
|
+QFrame { border: none; }
|
|
|
+QFrame[frameShape="4"] { background: #333355; max-width: 1px; }
|
|
|
+QFrame[frameShape="5"] { background: #333355; max-height: 1px; }
|
|
|
+
|
|
|
+/* ── status bar ── */
|
|
|
+QStatusBar { background: #0c0c1a; color: #555577; font-size: 11px; }
|
|
|
+
|
|
|
+/* ── checkboxes ── */
|
|
|
+QCheckBox { color: #aaaaaa; spacing: 5px; background: transparent; }
|
|
|
+QCheckBox::indicator {
|
|
|
+ width: 13px; height: 13px;
|
|
|
+ background: #16162a;
|
|
|
+ border: 1px solid #333355;
|
|
|
+ border-radius: 2px;
|
|
|
+}
|
|
|
+QCheckBox::indicator:checked { background: #f0c040; border-color: #f0c040; }
|
|
|
+QCheckBox::indicator:hover { border-color: #444466; }
|
|
|
+
|
|
|
+/* ── radio buttons ── */
|
|
|
+QRadioButton { color: #aaaaaa; spacing: 5px; background: transparent; }
|
|
|
+QRadioButton::indicator {
|
|
|
+ width: 13px; height: 13px;
|
|
|
+ background: #16162a;
|
|
|
+ border: 1px solid #333355;
|
|
|
+ border-radius: 7px;
|
|
|
+}
|
|
|
+QRadioButton::indicator:checked { background: #f0c040; border-color: #f0c040; }
|
|
|
+
|
|
|
+/* ── named toolbar / bar widgets ── */
|
|
|
+#ButtonBar, #SeqStatus, #FidToolBar, #SpecToolBar {
|
|
|
+ background: #16162a;
|
|
|
+ border-bottom: 1px solid #333355;
|
|
|
+}
|
|
|
+"""
|
|
|
+
|
|
|
|
|
|
class LFMRIWindow(QMainWindow):
|
|
|
"""Unified LF-MRI application window."""
|
|
|
@@ -79,6 +302,7 @@ class LFMRIWindow(QMainWindow):
|
|
|
super().__init__()
|
|
|
self.setWindowTitle("LF-MRI System")
|
|
|
self.setMinimumSize(960, 640)
|
|
|
+ QApplication.instance().setStyleSheet(_GLOBAL_CSS)
|
|
|
|
|
|
self._hw_config_path = hw_config_path
|
|
|
self._output_dir = output_dir
|
|
|
@@ -169,9 +393,6 @@ class LFMRIWindow(QMainWindow):
|
|
|
|
|
|
def _build_status_bar(self) -> None:
|
|
|
sb = QStatusBar()
|
|
|
- sb.setStyleSheet(
|
|
|
- "QStatusBar { background: #0c0c1a; color: #555577; font-size: 11px; }"
|
|
|
- )
|
|
|
self.setStatusBar(sb)
|
|
|
sb.showMessage(f"Active: {_TAB_NAMES[0]}")
|
|
|
|