studio/frontend: align custom titlebar sidebar surface with the real sidebar (#6455)
This commit is contained in:
parent
b4fa48e1b3
commit
45f060899e
2 changed files with 8 additions and 2 deletions
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -766,4 +766,6 @@ export {
|
|||
SidebarSeparator,
|
||||
SidebarTrigger,
|
||||
useSidebar,
|
||||
SIDEBAR_WIDTH,
|
||||
SIDEBAR_WIDTH_ICON,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue