From 706ce537e097b8b15e1feb3589e1aaaffe162448 Mon Sep 17 00:00:00 2001 From: pvrzz Date: Thu, 17 Sep 2026 20:55:29 -0400 Subject: [PATCH] Remove native menu bar and style scrollbars to match the app theme The default File/Edit/View/Window/Help menu and unstyled OS scrollbars made the window look like a generic Electron shell rather than a real app. Menu.setApplicationMenu(null) drops the menu bar; theme.css now themes scrollbars (thin, dark thumb) for both WebKit and Firefox. --- apps/desktop/src/main/index.ts | 4 +++- packages/ui/src/theme.css | 25 +++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/apps/desktop/src/main/index.ts b/apps/desktop/src/main/index.ts index 0f19008..74c2318 100644 --- a/apps/desktop/src/main/index.ts +++ b/apps/desktop/src/main/index.ts @@ -7,7 +7,7 @@ import { type BeatmapSet, type CollectionDatabase, } from "@directify/shared"; -import { app, BrowserWindow, dialog, ipcMain, shell } from "electron"; +import { app, BrowserWindow, dialog, ipcMain, shell, Menu } from "electron"; import { existsSync } from "node:fs"; import { readFile, writeFile } from "node:fs/promises"; import { join } from "node:path"; @@ -146,6 +146,8 @@ function createWindow(): void { } } +Menu.setApplicationMenu(null); + app.whenReady().then(async () => { const settings = loadSettings(); await applyProxySettings(settings.proxy); diff --git a/packages/ui/src/theme.css b/packages/ui/src/theme.css index 89a606b..a5fabd1 100644 --- a/packages/ui/src/theme.css +++ b/packages/ui/src/theme.css @@ -153,3 +153,28 @@ body { .df-range-thumb::-moz-range-track { background: transparent; } + +* { + scrollbar-width: thin; + scrollbar-color: var(--df-surface-4) transparent; +} + +*::-webkit-scrollbar { + width: 10px; + height: 10px; +} + +*::-webkit-scrollbar-track { + background: transparent; +} + +*::-webkit-scrollbar-thumb { + background-color: var(--df-surface-4); + border-radius: var(--df-radius-lg); + border: 2px solid transparent; + background-clip: content-box; +} + +*::-webkit-scrollbar-thumb:hover { + background-color: var(--df-text-muted); +}