mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 08:30:12 +01:00
🎨 新版 Electron 支持双击缩放
This commit is contained in:
parent
3473011ca9
commit
0b6b729ab5
3 changed files with 2 additions and 17 deletions
|
|
@ -41,7 +41,6 @@ import {hintMoveBlock} from "../../protyle/hint/extend";
|
|||
import {Backlink} from "../../layout/dock/Backlink";
|
||||
/// #if !BROWSER
|
||||
import {setZoom} from "../../layout/topBar";
|
||||
import {getCurrentWindow} from "@electron/remote";
|
||||
import {ipcRenderer} from "electron";
|
||||
/// #endif
|
||||
import {openHistory} from "../../history/history";
|
||||
|
|
@ -1419,7 +1418,6 @@ export const sendGlobalShortcut = (app: App) => {
|
|||
});
|
||||
ipcRenderer.send(Constants.SIYUAN_HOTKEY, {
|
||||
languages: window.siyuan.languages["_trayMenu"],
|
||||
id: getCurrentWindow().id,
|
||||
hotkeys
|
||||
});
|
||||
/// #endif
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ export abstract class Constants {
|
|||
// 渲染进程调主进程
|
||||
public static readonly SIYUAN_SHOW: string = "siyuan-show";
|
||||
public static readonly SIYUAN_HIDE: string = "siyuan-hide";
|
||||
|
||||
public static readonly SIYUAN_CONFIG_TRAY: string = "siyuan-config-tray";
|
||||
public static readonly SIYUAN_QUIT: string = "siyuan-quit";
|
||||
public static readonly SIYUAN_HOTKEY: string = "siyuan-hotkey";
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import {openFileById} from "../../editor/util";
|
|||
import {setPanelFocus} from "../../layout/util";
|
||||
/// #endif
|
||||
/// #if !BROWSER
|
||||
import {getCurrentWindow, systemPreferences} from "@electron/remote";
|
||||
import {systemPreferences} from "@electron/remote";
|
||||
/// #endif
|
||||
import {onGet} from "../util/onGet";
|
||||
import {hideElements} from "../ui/hideElements";
|
||||
|
|
@ -166,20 +166,6 @@ export class Breadcrumb {
|
|||
this.element.scrollLeft = this.element.scrollLeft + event.deltaY;
|
||||
}, {passive: true});
|
||||
/// #endif
|
||||
/// #if !BROWSER
|
||||
if ("windows" !== window.siyuan.config.system.os && "linux" !== window.siyuan.config.system.os) {
|
||||
const currentWindow = getCurrentWindow();
|
||||
element.querySelector(".protyle-breadcrumb__space").addEventListener("dblclick", (event) => {
|
||||
if (hasClosestByClassName(event.target as HTMLElement, "fullscreen")) {
|
||||
if (currentWindow.isMaximized()) {
|
||||
currentWindow.unmaximize();
|
||||
} else {
|
||||
currentWindow.maximize();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
/// #endif
|
||||
}
|
||||
|
||||
private startRecord(protyle: IProtyle) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue