mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-05-07 03:34:20 +08:00
fix: toolbar compact mode not triggering on Windows due to left-side overflow (#1375)
The toolbar container used `justify-end` which caused content to overflow to the left side. Browser `scrollWidth` does not account for left-side overflow, so `useAutoCompact` could never detect it and compact mode never activated — resulting in clipped tab labels (e.g. "aude" instead of "Claude") at minimum window width. Fix: remove `justify-end` from the toolbar container and use `ml-auto` on the child element instead. This keeps the right-aligned appearance but makes overflow go rightward, where `scrollWidth` correctly detects it and triggers compact mode. Co-authored-by: zuolan <zuolan1102@qq.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -24,3 +24,4 @@ flatpak/cc-switch.deb
|
||||
flatpak-build/
|
||||
flatpak-repo/
|
||||
.worktrees/
|
||||
.spec-workflow/
|
||||
+2
-2
@@ -996,10 +996,10 @@ function App() {
|
||||
)}
|
||||
<div
|
||||
ref={toolbarRef}
|
||||
className="flex flex-1 min-w-0 overflow-x-hidden justify-end items-center"
|
||||
className="flex flex-1 min-w-0 overflow-x-hidden items-center"
|
||||
>
|
||||
<div
|
||||
className="flex shrink-0 items-center gap-1.5"
|
||||
className="flex shrink-0 items-center gap-1.5 ml-auto"
|
||||
style={{ WebkitAppRegion: "no-drag" } as any}
|
||||
>
|
||||
{currentView === "prompts" && (
|
||||
|
||||
Reference in New Issue
Block a user