feat(desktop): add pinch zoom setting (#28632)
This commit is contained in:
parent
2697cb8001
commit
2caac055ef
11 changed files with 244 additions and 35 deletions
|
|
@ -14,7 +14,7 @@ import type {
|
|||
} from "../preload/types"
|
||||
import { runDesktopMenuAction } from "./desktop-menu-actions"
|
||||
import { getStore } from "./store"
|
||||
import { setTitlebar, updateTitlebar } from "./windows"
|
||||
import { getPinchZoomEnabled, setPinchZoomEnabled, setTitlebar, updateTitlebar } from "./windows"
|
||||
|
||||
const pickerFilters = (ext?: string[]) => {
|
||||
if (!ext || ext.length === 0) return undefined
|
||||
|
|
@ -202,6 +202,10 @@ export function registerIpcHandlers(deps: Deps) {
|
|||
if (!win) return
|
||||
updateTitlebar(win)
|
||||
})
|
||||
ipcMain.handle("get-pinch-zoom-enabled", () => getPinchZoomEnabled())
|
||||
ipcMain.handle("set-pinch-zoom-enabled", (_event: IpcMainInvokeEvent, enabled: boolean) => {
|
||||
setPinchZoomEnabled(enabled)
|
||||
})
|
||||
ipcMain.handle("set-titlebar", (event: IpcMainInvokeEvent, theme: TitlebarTheme) => {
|
||||
const win = BrowserWindow.fromWebContents(event.sender)
|
||||
if (!win) return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue