💄 window bar matches app

This commit is contained in:
2026-02-21 10:18:03 +10:00
parent 7a7b2732f7
commit 9bd46127a6
3 changed files with 27 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ function createWindow(): void {
minWidth: 900, minWidth: 900,
minHeight: 600, minHeight: 600,
title: 'Hohoff Editor', title: 'Hohoff Editor',
titleBarStyle: 'hiddenInset',
show: false, show: false,
webPreferences: { webPreferences: {
preload: join(__dirname, '../preload/index.js'), preload: join(__dirname, '../preload/index.js'),

View File

@@ -32,6 +32,9 @@ export default function App(): JSX.Element {
return ( return (
<div className="app-layout"> <div className="app-layout">
<div className="app-titlebar">
<span className="app-titlebar-title">Hohoff Editor</span>
</div>
<aside className="sidebar"> <aside className="sidebar">
<FileTree /> <FileTree />
</aside> </aside>

View File

@@ -1,11 +1,33 @@
.app-layout { .app-layout {
display: grid; display: grid;
grid-template-columns: 220px 1fr 340px; grid-template-columns: 220px 1fr 340px;
grid-template-rows: 100vh; grid-template-rows: 38px calc(100vh - 38px);
height: 100vh; height: 100vh;
overflow: hidden; overflow: hidden;
} }
.app-titlebar {
grid-column: 1 / -1;
display: flex;
align-items: center;
justify-content: center;
background: var(--sidebar-bg);
border-bottom: 1px solid var(--border);
/* Makes the entire bar draggable so the window can be moved */
-webkit-app-region: drag;
user-select: none;
position: relative;
}
.app-titlebar-title {
font-size: 12px;
font-family: var(--font-sans);
font-weight: 600;
letter-spacing: 0.08em;
color: var(--text-muted);
text-transform: uppercase;
}
/* ─── Sidebar ──────────────────────────────────────────────────── */ /* ─── Sidebar ──────────────────────────────────────────────────── */
.sidebar { .sidebar {
background: var(--sidebar-bg); background: var(--sidebar-bg);