Skip to content

Commit

Permalink
Disable new background material on Windows (#197, #198, #199, #207)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwbonner committed Oct 5, 2024
1 parent 4df1ba4 commit 62b847b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
15 changes: 9 additions & 6 deletions src/hub/hub.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
13 changes: 8 additions & 5 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 62b847b

Please sign in to comment.