studio/frontend: align custom titlebar sidebar surface with the real sidebar (#6455)

This commit is contained in:
oobabooga 2026-06-18 20:05:02 -03:00 committed by GitHub
commit 45f060899e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 2 deletions

View file

@ -1,6 +1,7 @@
// SPDX-License-Identifier: AGPL-3.0-only
// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0
import { SIDEBAR_WIDTH, SIDEBAR_WIDTH_ICON } from "@/components/ui/sidebar";
import { useSidebarPin } from "@/hooks/use-sidebar-pin";
import { isTauri } from "@/lib/api-base";
import { cn } from "@/lib/utils";
@ -243,8 +244,11 @@ export function WindowTitlebar({
>
{showSidebarSurface && (
<div
className="h-full shrink-0 border-r border-sidebar-border bg-sidebar"
style={{ width: pinned ? "16rem" : "3rem" }}
className={cn(
"h-full shrink-0 border-r border-sidebar-border dark:border-r-0",
pinned ? "bg-sidebar" : "bg-white dark:bg-background",
)}
style={{ width: pinned ? SIDEBAR_WIDTH : SIDEBAR_WIDTH_ICON }}
onMouseDown={handleDragMouseDown}
onDoubleClick={handleDragDoubleClick}
aria-hidden="true"

View file

@ -766,4 +766,6 @@ export {
SidebarSeparator,
SidebarTrigger,
useSidebar,
SIDEBAR_WIDTH,
SIDEBAR_WIDTH_ICON,
}