From 62b847be3063e3adba1004dc17ac9089339ba303 Mon Sep 17 00:00:00 2001 From: Jonah <47046556+jwbonner@users.noreply.github.com> Date: Sat, 5 Oct 2024 19:13:43 -0400 Subject: [PATCH] Disable new background material on Windows (#197, #198, #199, #207) --- src/hub/hub.ts | 15 +++++++++------ src/main/main.ts | 13 ++++++++----- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/hub/hub.ts b/src/hub/hub.ts index 7414adaa..ae425243 100644 --- a/src/hub/hub.ts +++ b/src/hub/hub.ts @@ -152,12 +152,15 @@ function updateFancyWindow() { } else { document.body.classList.remove("fancy-side-bar-mac"); } - if (window.platform === "win32" && Number(releaseSplit[releaseSplit.length - 1]) >= 22621) { - // Windows 11 22H2 - document.body.classList.add("fancy-side-bar-win"); - } else { - document.body.classList.remove("fancy-side-bar-win"); - } + + // Skip background material on Windows until https://github.com/electron/electron/issues/41824 is fixed + // + // if (window.platform === "win32" && Number(releaseSplit[releaseSplit.length - 1]) >= 22621) { + // // Windows 11 22H2 + // document.body.classList.add("fancy-side-bar-win"); + // } else { + // document.body.classList.remove("fancy-side-bar-win"); + // } } function setExporting(exporting: boolean) { diff --git a/src/main/main.ts b/src/main/main.ts index 6f9ef288..8fa23b5e 100644 --- a/src/main/main.ts +++ b/src/main/main.ts @@ -2160,12 +2160,15 @@ function createHubWindow(state?: WindowState) { if (Number(os.release().split(".")[0]) >= 20) prefs.titleBarStyle = "hiddenInset"; // macOS Big Sur break; case "win32": + // Skip background material on Windows until https://github.com/electron/electron/issues/41824 is fixed + // + // let releaseSplit = os.release().split("."); + // if (Number(releaseSplit[releaseSplit.length - 1]) >= 22621) { + // // Windows 11 22H2 + // prefs.backgroundMaterial = "acrylic"; + // } + prefs.titleBarStyle = "hidden"; - let releaseSplit = os.release().split("."); - if (Number(releaseSplit[releaseSplit.length - 1]) >= 22621) { - // Windows 11 22H2 - prefs.backgroundMaterial = "acrylic"; - } let overlayOptions: TitleBarOverlay = { color: "#00000000", symbolColor: nativeTheme.shouldUseDarkColors ? "#ffffff" : "#000000",