From cdb5fd31e2ed99ace7c7f13eba06a2012047407e Mon Sep 17 00:00:00 2001 From: hugo Date: Tue, 17 Feb 2026 07:20:28 +0100 Subject: [PATCH] fix: some work-over for the sidebar toggle --- .../WindowTitleBar/WindowTitleBar.css | 32 ++++++++++++++++--- .../WindowTitleBar/WindowTitleBar.tsx | 12 ++----- .../components/WindowTitleBar.test.tsx | 11 ++++--- 3 files changed, 36 insertions(+), 19 deletions(-) diff --git a/src/renderer/components/WindowTitleBar/WindowTitleBar.css b/src/renderer/components/WindowTitleBar/WindowTitleBar.css index 5744ba4..2afef42 100644 --- a/src/renderer/components/WindowTitleBar/WindowTitleBar.css +++ b/src/renderer/components/WindowTitleBar/WindowTitleBar.css @@ -7,6 +7,7 @@ border-bottom: 1px solid var(--vscode-editorGroupHeader-tabsBorder, #1e1e1e); flex-shrink: 0; -webkit-app-region: drag; + padding-right: 10px; } .window-titlebar-drag-region { @@ -18,25 +19,46 @@ height: 100%; display: flex; align-items: center; - margin-right: 8px; + margin-right: 6px; } .window-titlebar-action-button { display: flex; align-items: center; justify-content: center; - width: 28px; - height: 28px; + width: 30px; + height: 30px; background: transparent; border: none; - color: var(--vscode-titleBar-activeForeground, var(--vscode-icon-foreground, #c5c5c5)); + color: var(--vscode-foreground, #cccccc); cursor: pointer; border-radius: 4px; -webkit-app-region: no-drag; } -.window-titlebar-action-button svg { +.window-titlebar-action-button:focus, +.window-titlebar-action-button:focus-visible { + outline: none; + box-shadow: none; +} + +.window-titlebar-sidebar-icon { + width: 14px; + height: 14px; + border: 1.5px solid currentColor; + border-radius: 2px; display: block; + position: relative; + overflow: hidden; +} + +.window-titlebar-sidebar-pane { + position: absolute; + left: 0; + top: 0; + width: 50%; + height: 100%; + background-color: currentColor; } .window-titlebar-action-button:hover { diff --git a/src/renderer/components/WindowTitleBar/WindowTitleBar.tsx b/src/renderer/components/WindowTitleBar/WindowTitleBar.tsx index 4dc1781..3f3f8a5 100644 --- a/src/renderer/components/WindowTitleBar/WindowTitleBar.tsx +++ b/src/renderer/components/WindowTitleBar/WindowTitleBar.tsx @@ -15,15 +15,9 @@ export const WindowTitleBar: React.FC = () => { onClick={toggleSidebar} title={`${sidebarVisible ? 'Hide' : 'Show'} Sidebar (Ctrl+B)`} > - +