Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

refractor(photos):use-windows-titlebar-on-linux-as-well

Aswin Asokec8bbaeabf29
diff --git a/desktop/changes/native-linux-titlebar.md b/desktop/changes/native-linux-titlebar.md
index 52f6be0e62..48f7647fc9 100644
--- a/desktop/changes/native-linux-titlebar.md
+++ b/desktop/changes/native-linux-titlebar.md
@@ -1 +1 @@
-- Improved desktop title bars to follow the selected theme and use native window decorations on Linux.
+- Improved desktop title bars to follow the selected theme on Windows and Linux.
diff --git a/desktop/src/main.ts b/desktop/src/main.ts
index cece239a58..81bdb5d59c 100644
--- a/desktop/src/main.ts
+++ b/desktop/src/main.ts
@@ -179,20 +179,14 @@ const createMainWindow = () => {
icon,
...(bounds ?? {}),
...minimumWindowSize(),
- ...(process.platform == "linux"
- ? {}
- : {
- titleBarStyle: "hidden" as const,
- titleBarOverlay:
- process.platform == "win32"
- ? {
- color: shouldUseDarkColors ? "black" : "white",
- symbolColor: shouldUseDarkColors
- ? "#cdcdcd"
- : "black",
- }
- : true,
- }),
+ titleBarStyle: "hidden",
+ titleBarOverlay:
+ process.platform == "darwin"
+ ? true
+ : {
+ color: shouldUseDarkColors ? "black" : "white",
+ symbolColor: shouldUseDarkColors ? "#cdcdcd" : "black",
+ },
backgroundColor: shouldUseDarkColors ? "black" : "white",
show: false,
});
diff --git a/desktop/src/main/ipc.ts b/desktop/src/main/ipc.ts
index c4437aacbe..ad6d0a70a3 100644
--- a/desktop/src/main/ipc.ts
+++ b/desktop/src/main/ipc.ts
@@ -290,7 +290,7 @@ export const attachMainWindowIPCHandlers = (mainWindow: BrowserWindow) => {
userPreferences.set("themeMode", themeMode);
nativeTheme.themeSource = themeMode;
- if (process.platform != "win32") return;
+ if (process.platform == "darwin") return;
const isDark = nativeTheme.shouldUseDarkColors || isFileViewerOpen;
mainWindow.setTitleBarOverlay({