mirror of
https://github.com/marktext/marktext.git
synced 2025-05-02 09:22:52 +08:00
Support negative zoom (#2412)
This commit is contained in:
parent
63642d3921
commit
c24ef6ea4b
@ -17,5 +17,5 @@ export const zoomOut = win => {
|
||||
const { webContents } = win
|
||||
const zoom = webContents.getZoomFactor()
|
||||
// WORKAROUND: We need to set zoom on the browser window due to Electron#16018.
|
||||
webContents.send('mt::window-zoom', Math.max(1.0, zoom - 0.125))
|
||||
webContents.send('mt::window-zoom', Math.max(0.5, zoom - 0.125))
|
||||
}
|
||||
|
@ -531,38 +531,50 @@ const commands = [
|
||||
description: 'Window: Zoom...',
|
||||
subcommands: [{
|
||||
id: 'file.zoom-0',
|
||||
description: '0.625',
|
||||
value: 0.625
|
||||
}, {
|
||||
id: 'file.zoom-1',
|
||||
description: '0.75',
|
||||
value: 0.75
|
||||
}, {
|
||||
id: 'file.zoom-2',
|
||||
description: '0.875',
|
||||
value: 0.875
|
||||
}, {
|
||||
id: 'file.zoom-3',
|
||||
description: '1.0',
|
||||
value: 1.0
|
||||
}, {
|
||||
id: 'file.zoom-1',
|
||||
id: 'file.zoom-4',
|
||||
description: '1.125',
|
||||
value: 1.125
|
||||
}, {
|
||||
id: 'file.zoom-2',
|
||||
id: 'file.zoom-5',
|
||||
description: '1.25',
|
||||
value: 1.25
|
||||
}, {
|
||||
id: 'file.zoom-3',
|
||||
id: 'file.zoom-6',
|
||||
description: '1.375',
|
||||
value: 1.375
|
||||
}, {
|
||||
id: 'file.zoom-4',
|
||||
id: 'file.zoom-7',
|
||||
description: '1.5',
|
||||
value: 1.5
|
||||
}, {
|
||||
id: 'file.zoom-5',
|
||||
id: 'file.zoom-8',
|
||||
description: '1.625',
|
||||
value: 1.625
|
||||
}, {
|
||||
id: 'file.zoom-6',
|
||||
id: 'file.zoom-9',
|
||||
description: '1.75',
|
||||
value: 1.75
|
||||
}, {
|
||||
id: 'file.zoom-7',
|
||||
id: 'file.zoom-10',
|
||||
description: '1.875',
|
||||
value: 1.875
|
||||
}, {
|
||||
id: 'file.zoom-8',
|
||||
id: 'file.zoom-11',
|
||||
description: '2.0',
|
||||
value: 2.0
|
||||
}],
|
||||
|
Loading…
Reference in New Issue
Block a user