Polish GUI design

This commit is contained in:
Ayzen
2026-10-06 14:16:14 +03:00
parent 5bb86b7165
commit 4947d5a14e
25 changed files with 222 additions and 235 deletions
+14 -10
View File
@@ -2,9 +2,10 @@
from pathlib import Path
from PyQt6.QtCore import Qt
from PyQt6.QtWidgets import (
QFileDialog, QFrame, QHBoxLayout, QLabel, QMainWindow, QPushButton,
QScrollArea, QVBoxLayout, QWidget,
QFileDialog, QFrame, QHBoxLayout, QLabel, QMainWindow,
QScrollArea, QToolButton, QVBoxLayout, QWidget,
)
from python_app.gui.controllers.history_controller import HistoryController
@@ -29,9 +30,9 @@ class WindowView:
layout.setContentsMargins(12, 12, 12, 12)
layout.setSpacing(14)
layout.addWidget(plot_stack, stretch=11)
self._toggle = QPushButton(">")
self._toggle.setObjectName("settingsToggleButton")
self._toggle.setFixedWidth(26)
self._toggle = QToolButton()
self._toggle.setAutoRaise(True)
self._toggle.setArrowType(Qt.ArrowType.RightArrow)
self._toggle.setToolTip("Hide settings panel")
self._toggle.clicked.connect(self.toggle_settings)
layout.addWidget(self._toggle)
@@ -40,12 +41,12 @@ class WindowView:
settings_layout = QVBoxLayout(self.settings_panel)
settings_layout.setContentsMargins(0, 0, 0, 0)
settings_layout.setSpacing(10)
self.primary = build_primary_actions_group()
self.processing = build_processing_group(config, gui)
self.primary = build_primary_actions_group(self.processing.mode)
settings_layout.addWidget(self.primary.group)
self.data = build_data_actions_group(gui)
self.switches = build_switch_group(config, gui)
self.preprocess = build_preprocess_summary_group()
self.processing = build_processing_group(config, gui)
self.radar = build_radar_group(config)
self.data.browse.clicked.connect(lambda: self.browse_save_path(project_root))
self.sections = (self.data, self.switches, self.preprocess, self.processing, self.radar)
@@ -63,10 +64,13 @@ class WindowView:
settings_layout.addWidget(scroll, stretch=1)
self.status = QLabel("Status: idle")
self.status.setObjectName("statusLabel")
self.status.setWordWrap(True)
self._history = QLabel("History: raw=0, preprocessed=0, results=0")
self._history.setObjectName("hintLabel")
settings_layout.addWidget(self.status)
settings_layout.addWidget(self._history)
status_row = QHBoxLayout()
status_row.addWidget(self.status, stretch=1)
status_row.addWidget(self._history, alignment=Qt.AlignmentFlag.AlignRight)
settings_layout.addLayout(status_row)
settings_layout.addWidget(log_panel)
layout.addWidget(self.settings_panel, stretch=7)
parent.resize(1650, 940)
@@ -74,7 +78,7 @@ class WindowView:
def toggle_settings(self) -> None:
visible = self.settings_panel.isHidden()
self.settings_panel.setVisible(visible)
self._toggle.setText(">" if visible else "<")
self._toggle.setArrowType(Qt.ArrowType.RightArrow if visible else Qt.ArrowType.LeftArrow)
self._toggle.setToolTip("Hide settings panel" if visible else "Show settings panel")
def update_history(self, history: HistoryController) -> None: