From 4abbe86963fb0360c3e570b27631508f89936579 Mon Sep 17 00:00:00 2001 From: Nico Date: Fri, 3 Apr 2026 22:39:44 +0200 Subject: [PATCH] Group toolbar items into visual pill containers Four groups: connection, quad view, themes, panel config. Each group shares one background pill. Bigger icons (w-6 h-6), 36px hit area with minimal padding. Co-Authored-By: Claude Sonnet 4.6 --- src/components/AppToolbar.vue | 208 +++++++++++++++------------------- 1 file changed, 93 insertions(+), 115 deletions(-) diff --git a/src/components/AppToolbar.vue b/src/components/AppToolbar.vue index 93934e9..8f62926 100644 --- a/src/components/AppToolbar.vue +++ b/src/components/AppToolbar.vue @@ -1,93 +1,69 @@ @@ -218,51 +192,57 @@ function toggleDropdown(panel: 'conn' | 'takeover') { .toolbar-spacer { flex: 1; } -.toolbar-divider { - width: 1px; - height: 18px; - background: var(--border); - opacity: 0.5; - flex-shrink: 0; -} - -.toolbar-pill { +/* Group: shared pill container */ +.toolbar-group { display: flex; align-items: center; - gap: 6px; background: var(--panel-bg); border-radius: var(--radius-panel, 12px); box-shadow: var(--panel-shadow); - padding: 0 12px; - height: 34px; - font-size: 0.85rem; + padding: 2px; + gap: 1px; + flex-shrink: 0; +} + +/* Button inside a group */ +.toolbar-btn { + display: flex; + align-items: center; + justify-content: center; + gap: 5px; + width: 36px; + height: 36px; + border-radius: calc(var(--radius-panel, 12px) - 3px); color: var(--text-dim); border: none; + background: none; cursor: pointer; - transition: color 0.12s, background 0.12s; + font-size: 0.85rem; white-space: nowrap; + transition: color 0.12s, background 0.12s; + flex-shrink: 0; } -.toolbar-pill:hover { color: var(--text); } -.toolbar-pill.active { color: var(--accent); } +.toolbar-btn:hover { color: var(--text); background: color-mix(in srgb, var(--text) 6%, transparent); } +.toolbar-btn.active { color: var(--accent); } -.toolbar-pill-icon { - width: 34px; - padding: 0; - justify-content: center; +/* Connection button widens when it has a label */ +.toolbar-btn:has(.toolbar-btn-label) { + width: auto; + padding: 0 8px; } - -.toolbar-pill-dim { - opacity: 0.5; -} -.toolbar-pill-dim:hover { opacity: 0.8; } - -.toolbar-pill-label { +.toolbar-btn-label { overflow: hidden; text-overflow: ellipsis; } -.toolbar-version-text { - font-size: 0.65rem; +.toolbar-btn-dim { opacity: 0.45; } +.toolbar-btn-dim:hover { opacity: 0.8; } + +.toolbar-version-text { font-size: 0.65rem; } + +@media (max-width: 480px) { + .toolbar-btn-label { display: none; } + .toolbar-btn:has(.toolbar-btn-label) { width: 32px; padding: 0; } } /* Panel dropdown */ @@ -334,9 +314,7 @@ function toggleDropdown(panel: 'conn' | 'takeover') { } .toolbar-panel-action:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent); } -/* Mobile: hide labels, shrink pills */ @media (max-width: 480px) { - .toolbar-pill-label { display: none; } .toolbar-panel { width: min(220px, calc(100vw - 16px)); } }