diff --git a/electron/main/backend/submitter.ts b/electron/main/backend/submitter.ts index be559f3a..cbe523ac 100644 --- a/electron/main/backend/submitter.ts +++ b/electron/main/backend/submitter.ts @@ -448,6 +448,7 @@ export function registerSubmitterHandlers( width: 800, height: 900, frame: false, + transparent: true, show: false, autoHideMenuBar: true, icon: path.join(process.env.VITE_PUBLIC!, "favicon.ico"), diff --git a/electron/main/index.ts b/electron/main/index.ts index ebf970b6..97f7451b 100644 --- a/electron/main/index.ts +++ b/electron/main/index.ts @@ -72,6 +72,13 @@ if (!app.requestSingleInstanceLock()) { import "./backend/install-manager.js"; import "./handle-url-scheme.js"; +// 关闭 Linux 的覆盖式(overlay)滚动条,强制使用经典滚动条, +// 否则 GTK overlay 滚动条会忽略渲染进程的 ::-webkit-scrollbar 颜色, +// 导致暗色模式下滚动条始终是原生灰色。必须在 app ready 前设置。 +if (process.platform === "linux") { + app.commandLine.appendSwitch("disable-features", "OverlayScrollbar"); +} + const logger = pino({ name: "index.ts" }); const FLARUM_TOKEN_URL = "https://bbs.spark-app.store/api/token"; diff --git a/src/App.vue b/src/App.vue index 83240255..9144ed45 100644 --- a/src/App.vue +++ b/src/App.vue @@ -73,7 +73,7 @@ :category-counts="categoryCounts" @select-category="selectSubCategory" /> -