From 9aac28c0cfd6d83fcb0b7bb718220176a0d22484 Mon Sep 17 00:00:00 2001 From: Vincent Date: Thu, 3 Sep 2026 22:19:17 +0200 Subject: [PATCH] Drop the title bar; drag the window by the nav MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The page now runs to the very top of the window: titleBarStyle Overlay gives the full size content view, so there is no reserved band above the apps and the nav reaches the top edge with the traffic lights floating over it. That costs the old drag strip. A native webview swallows mouse events, so the shell cannot offer a drag region anywhere over a page — once the page starts at y=0 the only surface left is the nav. So the nav becomes the handle, all of it, at either width. Every container carries the attribute and only the buttons do not, which keeps them clickable: a drag region is decided by the element under the cursor. The scrolling app list is included, and loses nothing by it — mousedown is all a drag region takes, never the wheel or a trackpad swipe. Verified by dragging from bare points in both the collapsed rail and the expanded panel: the window follows the delta exactly, and clicking an app still switches to it rather than moving the window. --- src-tauri/tauri.conf.json | 3 +- src/App.tsx | 8 ++++-- src/components/Nav.tsx | 59 ++++++++++++++++++++++++++++----------- 3 files changed, 51 insertions(+), 19 deletions(-) diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 2ad63b0..69a1e7e 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -19,7 +19,8 @@ "minWidth": 900, "minHeight": 600, "center": true, - "hiddenTitle": true + "hiddenTitle": true, + "titleBarStyle": "Overlay" } ], "security": { diff --git a/src/App.tsx b/src/App.tsx index 49c060a..425e60b 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -265,9 +265,13 @@ export default function App() { /> {/* The hole an app's native webview is positioned into. It stays empty - on purpose — anything drawn here would be painted over. */} + on purpose — anything drawn here would be painted over. + + It runs to the very top of the window: there is no title bar to sit + under. Nothing draggable can go here either, for the same reason the + hole is empty — the webview would swallow it. Dragging lives in the + nav, which is the one column the shell still owns. */}
-
+ @@ -169,7 +187,7 @@ export default function Nav({ const active = "bg-slate-900 text-white dark:bg-white dark:text-slate-900"; const appRow = (app: WorkApp) => ( -
  • +
  • - {!g.collapsed &&
      {apps.map(appRow)}
    } + {!g.collapsed &&
      {apps.map(appRow)}
    } ); })} {config.apps.length === 0 && ( -

    +

    No apps yet. Open Settings to add the first one.

    )} @@ -232,7 +256,10 @@ export default function Nav({ -