From 6cc10220be7e7eb5e91ebdd98cf7116d9370e3d1 Mon Sep 17 00:00:00 2001 From: Willie Date: Sun, 4 Oct 2026 19:34:24 +0800 Subject: [PATCH] fix(ui): make the mixed folder switch read as partly on The tree pane's folder switch showed a partial state by only centering the knob on the off-colored track. On a 34px track that looked like a stuck or broken off switch. Give the mixed state a half-tone track and a dash in the knob, the way an indeterminate checkbox reads. --- ui/src/components.css | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ui/src/components.css b/ui/src/components.css index 2e5b359a5..a5d0cf197 100644 --- a/ui/src/components.css +++ b/ui/src/components.css @@ -158,12 +158,15 @@ svg.lucide { flex: none; stroke-width: var(--isw); } .ss-sw i { width: 16px; height: 16px; border-radius: 99px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); } .ss-sw.on { background: var(--ink); justify-content: flex-end; } .ss-sw.on i { background: var(--surface); } -/* Some of the items it covers are on: knob in the middle, track as for off. */ -.ss-sw.mix { justify-content: center; } +/* Some of the items it covers are on: half-tone track, centered knob with a dash. */ +.ss-sw.mix { justify-content: center; background: var(--ink-3); } +.ss-sw.mix i { display: grid; place-items: center; } +.ss-sw.mix i::after { content: ''; width: 8px; height: 2px; border-radius: 1px; background: var(--ink-3); } :root[data-theme="playful"] .ss-sw { width: 38px; height: 22px; background: var(--surface); border: 2px solid var(--line); padding: 2px; } :root[data-theme="playful"] .ss-sw i { width: 14px; height: 14px; background: var(--ink-3); box-shadow: none; } :root[data-theme="playful"] .ss-sw.on { background: var(--ok-bg); } :root[data-theme="playful"] .ss-sw.on i { background: var(--ok); } +:root[data-theme="playful"] .ss-sw.mix i::after { width: 6px; background: var(--surface); } .ss-st { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; white-space: nowrap; } .ss-st::before { content: ''; width: 7px; height: 7px; border-radius: 99px; background: var(--ink-3); } .ss-st.ok::before { background: var(--ok); }