Skip to content

armgit / ente

Public Imported from GitHub
0

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

Custom titlebar - step 1

Manav Rathi5e7ac4437f0c
diff --git a/desktop/src/main.ts b/desktop/src/main.ts
index ca472fffa6..9f17439d2c 100644
--- a/desktop/src/main.ts
+++ b/desktop/src/main.ts
@@ -347,6 +347,13 @@ const createMainWindow = () => {
...(bounds ?? {}),
// Enforce a minimum size
...minimumWindowSize(),
+ // Remove the default titlebar, we will render our own that better with
+ // the theme. This is also a prerequisite to have a transparent
+ // backgoundColor of the window during loading (we cannot use a fixed
+ // color because it is theme dependent, and information about the
+ // currently applicable theme is not available at this point).
+ titleBarStyle: "hidden",
+ ...(process.platform !== "darwin" ? { titleBarOverlay: true } : {}),
// The color to show in the window until the web content gets loaded.
// See: https://www.electronjs.org/docs/latest/api/browser-window#setting-the-backgroundcolor-property
backgroundColor: "black",