mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Custom title controls on Windows (#4528)
* Add context menu in topbar Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Adding windows title buttons Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Adding win sandwitch icon Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Hide windows controls behind the flags Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Adding tests Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Fix topbar layout Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Using topbar as draggable area Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Fix sandwich icon Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Mark no-draggable areas Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Remove ipcMainOn window calls Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Fix tests Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Explicitly hide main window menu Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Fix tests more Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Restore linux native view Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Not removing menu in linux Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Showing custom window buttons in Linux Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Remove frame on linux and windows Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Move open context menu event handler to initializers Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com> * Set x, y context menu position explicitly Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
1 parent
1e22cffcd8
commit
637f26ae1e
9 files changed
+295
-29
No files matched your search
@@ -29,9 +29,13 @@ import { delay, iter, Singleton } from "../common/utils";
|
||||
import { ClusterFrameInfo, clusterFrameMap } from "../common/cluster-frames";
|
||||
import { IpcRendererNavigationEvents } from "../renderer/navigation/events";
|
||||
import logger from "./logger";
|
||||
import { productName } from "../common/vars";
|
||||
import { isMac, productName } from "../common/vars";
|
||||
import { LensProxy } from "./lens-proxy";
|
||||
|
||||
export const enum IpcMainWindowEvents {
|
||||
OPEN_CONTEXT_MENU = "window:open-context-menu",
|
||||
}
|
||||
|
||||
function isHideable(window: BrowserWindow | null): boolean {
|
||||
return Boolean(window && !window.isDestroyed());
|
||||
}
|
||||
@@ -81,7 +85,8 @@ export class WindowManager extends Singleton {
|
||||
show: false,
|
||||
minWidth: 700, // accommodate 800 x 600 display minimum
|
||||
minHeight: 500, // accommodate 800 x 600 display minimum
|
||||
titleBarStyle: "hiddenInset",
|
||||
titleBarStyle: isMac ? "hiddenInset" : "hidden",
|
||||
frame: isMac,
|
||||
backgroundColor: "#1e2124",
|
||||
webPreferences: {
|
||||
nodeIntegration: true,
|
||||
|
||||
Reference in new issue
Block a user