diff --git a/src/app/PanelHeader.cpp b/src/app/PanelHeader.cpp index 1969565..832555c 100644 --- a/src/app/PanelHeader.cpp +++ b/src/app/PanelHeader.cpp @@ -30,8 +30,8 @@ constexpr int kTabIcon = 19; // Tab 图标 // 面板标题=title(15)、徽标=caption(12)、Tab 文本=body(13),加粗统一 semibold。 // #panelBadge 为中性计数徽标;#panelBadgeWarn 为“需注意”变体(语义 warning 色), // 供异常计数等承载“待复查”含义的徽标使用(调用方改 objectName 即切换)。 -// 表头底/标题/徽标样式。Tab(ElaToolButton)与操作按钮(ElaIconButton)自绘 Fluent, -// 不再写它们的 QSS(选中态由 Ela 的 checked 高亮表达,而非自定义下划线)。 +// 表头底/标题/徽标 + 页签样式。页签选中态 = 强调色文字 + 2px 强调色下划线, +// 与视图/详情工具条完全一致(全 UI 切换控件统一这一套)。操作按钮(ElaIconButton)自绘 Fluent。 QString headerQss() { return QStringLiteral( @@ -40,12 +40,18 @@ QString headerQss() "#panelBadge { background:#EAEEF5; color:#5A6B85; border-radius:9px;" " padding:1px 7px; font-size:%2px; font-weight:%3; }" "#panelBadgeWarn { background:%4; color:%5; border-radius:9px;" - " padding:1px 7px; font-size:%2px; font-weight:%3; }") + " padding:1px 7px; font-size:%2px; font-weight:%3; }" + "QToolButton#tabBtn { border:none; border-bottom:2px solid transparent; color:#5A6B85;" + " padding:8px 6px; font-size:%6px; }" + "QToolButton#tabBtn:hover { color:#1F2A3D; }" + "QToolButton#tabBtn:checked { color:#2D6CB5; font-weight:%3;" + " border-bottom:2px solid #2D6CB5; }") .arg(type::kTitle) .arg(type::kCaption) .arg(type::kWeightSemibold) .arg(QString::fromUtf8(semantic::kWarningFill)) - .arg(QString::fromUtf8(semantic::kWarning)); + .arg(QString::fromUtf8(semantic::kWarning)) + .arg(type::kBody); } // 数量徽标(默认隐藏,调用方 setText+setVisible 显示)。 @@ -135,7 +141,7 @@ TabbedPanel buildTabbedPanel(const QVector& tabs, const QVector
setObjectName(QStringLiteral("tabBtn")); btn->setText(t.title); setThemedGlyph(btn, t.icon, kTabIcon); // 随主题着色