fix(window): force dark native title bar

Apply Electron nativeTheme dark mode before creating the main window so the Windows title bar remains dark across local, server, and Remote Desktop profiles. Add focused regression coverage for the native theme contract.
This commit is contained in:
Sucukdeluxe
2026-08-23 19:06:31 +02:00
parent a6c6464761
commit 09bbff1887
3 changed files with 25 additions and 3 deletions
+12
View File
@@ -0,0 +1,12 @@
import { describe, expect, it } from "vitest";
import { forceDarkNativeTheme } from "../src/main/native-theme";
describe("native window theme", () => {
it("forces the native Windows title bar to use the dark theme", () => {
const theme = { themeSource: "system" };
forceDarkNativeTheme(theme);
expect(theme.themeSource).toBe("dark");
});
});