refactor: drop the duplicate in-app title bar; use the OS window title
The in-content header strip showed the app name + version, duplicating the OS window title (setWindowTitle). With the 设置 button already gone it had no other purpose, so remove it (and its styles / unused _HEADER_HEIGHT). Name and version stay visible via the OS title bar; the work area gains ~40px. Docs: UI design 3 (layout) and 4.1 (title bar), tasks.md 17.7. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+3
-42
@@ -29,7 +29,6 @@ logger = logging.getLogger(__name__)
|
||||
_LEFT_WIDTH = 374
|
||||
_RIGHT_WIDTH = 318
|
||||
_QUEUE_HEIGHT = 188
|
||||
_HEADER_HEIGHT = 40
|
||||
_TABBAR_HEIGHT = 34
|
||||
|
||||
|
||||
@@ -60,7 +59,9 @@ class MainWindow(QMainWindow):
|
||||
layout.setContentsMargins(0, 0, 0, 0)
|
||||
layout.setSpacing(0)
|
||||
|
||||
layout.addWidget(self._create_header())
|
||||
# No in-app title bar: the OS window title (setWindowTitle) already
|
||||
# shows the app name and version, so an in-content header would just
|
||||
# duplicate it. Start straight from the workflow tab bar.
|
||||
layout.addWidget(self._create_tab_bar())
|
||||
layout.addWidget(self._create_work_area(), stretch=1)
|
||||
layout.addWidget(self._create_queue_panel())
|
||||
@@ -70,29 +71,6 @@ class MainWindow(QMainWindow):
|
||||
self._connect_signals()
|
||||
self._restore_preferences()
|
||||
|
||||
def _create_header(self):
|
||||
"""Top header: app name and version label."""
|
||||
header = QWidget()
|
||||
header.setObjectName("header")
|
||||
header.setFixedHeight(_HEADER_HEIGHT)
|
||||
|
||||
row = QHBoxLayout(header)
|
||||
row.setContentsMargins(12, 0, 12, 0)
|
||||
row.setSpacing(6)
|
||||
|
||||
title = QLabel(APP_NAME)
|
||||
title.setObjectName("appTitle")
|
||||
|
||||
version = QLabel("v{}".format(APP_VERSION))
|
||||
version.setObjectName("appVersion")
|
||||
version.setAlignment(Qt.AlignVCenter)
|
||||
|
||||
row.addWidget(title)
|
||||
row.addWidget(version)
|
||||
row.addStretch()
|
||||
|
||||
return header
|
||||
|
||||
def _create_tab_bar(self):
|
||||
"""Workflow step selector (QTabBar only — no swappable pane)."""
|
||||
container = QWidget()
|
||||
@@ -458,23 +436,6 @@ class MainWindow(QMainWindow):
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
#header {
|
||||
background-color: #ffffff;
|
||||
border-bottom: 1px solid #d6d6d6;
|
||||
}
|
||||
#appTitle {
|
||||
font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #1a1a1a;
|
||||
}
|
||||
#appVersion {
|
||||
font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
|
||||
font-size: 11px;
|
||||
color: #888888;
|
||||
}
|
||||
|
||||
/* Flow tab bar */
|
||||
#tabBarContainer {
|
||||
background-color: #f0f0f0;
|
||||
|
||||
Reference in New Issue
Block a user