mirror of
https://github.com/zadam/trilium.git
synced 2025-06-06 18:08:33 +02:00
keyboard based zooming in electron, fixes #10
This commit is contained in:
parent
a10269a086
commit
27f12a0186
@ -90,6 +90,28 @@ $(document).bind('keydown', "ctrl+shift+down", () => {
|
||||
return false;
|
||||
});
|
||||
|
||||
$(document).bind('keydown', 'ctrl+-', () => {
|
||||
if (isElectron()) {
|
||||
const webFrame = require('electron').webFrame;
|
||||
|
||||
if (webFrame.getZoomFactor() > 0.2) {
|
||||
webFrame.setZoomFactor(webFrame.getZoomFactor() - 0.1);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$(document).bind('keydown', 'ctrl+=', () => {
|
||||
if (isElectron()) {
|
||||
const webFrame = require('electron').webFrame;
|
||||
|
||||
webFrame.setZoomFactor(webFrame.getZoomFactor() + 0.1);
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$("#note-title").bind('keydown', 'return', () => $("#note-detail").focus());
|
||||
|
||||
$(window).on('beforeunload', () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user