fix(ui): 恢复弹窗丢弃按钮样式 + 标题栏窗口图标统一

丢弃按钮是裸按钮(.recovery-actions 只写了布局),补标准次按钮样式;
标题栏最小化/最大化/关闭原用文字字形(—/□/×)天然大小不一,
换成统一 10×10 画布、1px 线宽的内联 SVG,按钮加居中对齐。
This commit is contained in:
Muse
2026-11-14 11:48:15 +08:00
parent e8701d4eeb
commit a38409662c
2 changed files with 12 additions and 4 deletions

View File

@@ -32,9 +32,15 @@ export default function TitleBar({ docTitle, dirty }: Props) {
</span>
{tauri && (
<span className="window-controls">
<button aria-label="最小化" onClick={() => void winAction('min')}>—</button>
<button aria-label="最大化或还原" onClick={() => void winAction('max')}>□</button>
<button aria-label="关闭" className="wc-close" onClick={() => void winAction('close')}>×</button>
<button aria-label="最小化" onClick={() => void winAction('min')}>
<svg width="10" height="10" viewBox="0 0 10 10" aria-hidden="true"><path d="M0 5 H10" stroke="currentColor" strokeWidth="1" /></svg>
</button>
<button aria-label="最大化或还原" onClick={() => void winAction('max')}>
<svg width="10" height="10" viewBox="0 0 10 10" aria-hidden="true"><rect x="0.5" y="0.5" width="9" height="9" fill="none" stroke="currentColor" /></svg>
</button>
<button aria-label="关闭" className="wc-close" onClick={() => void winAction('close')}>
<svg width="10" height="10" viewBox="0 0 10 10" aria-hidden="true"><path d="M0 0 L10 10 M10 0 L0 10" stroke="currentColor" strokeWidth="1" /></svg>
</button>
</span>
)}
</header>

View File

@@ -37,7 +37,7 @@ button { font: inherit; color: inherit; }
.titlebar-app { color: var(--text-dim); }
.dirty-dot { color: #d08a2d; font-size: 10px; }
.window-controls { margin-left: auto; display: flex; height: 100%; }
.window-controls button { width: 46px; border: 0; background: transparent; cursor: pointer; font-size: 14px; }
.window-controls button { width: 46px; border: 0; background: transparent; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; color: var(--text); }
.window-controls button:hover { background: var(--hover); }
.window-controls .wc-close:hover { background: #c42b1c; color: #fff; }
@@ -153,6 +153,8 @@ kbd { background: var(--code-bg); border: 1px solid var(--border); border-radius
.recovery-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.recovery-meta span { color: var(--text-dim); font-size: 12px; }
.recovery-actions { display: flex; gap: 6px; flex: none; }
.recovery-actions button:not(.primary) { border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 7px; padding: 6px 14px; cursor: pointer; }
.recovery-actions button:not(.primary):hover { background: var(--accent-weak); }
.modal-actions.column { flex-direction: column; align-items: stretch; }
.modal-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; margin: 8px 0 4px; }
.tree-context-menu { position: fixed; z-index: 90; background: var(--bg-editor); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 10px 26px rgba(0,0,0,0.16); padding: 4px; min-width: 150px; }