Skip to content

Commit

Permalink
🎨 fix #7739
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed Mar 24, 2023
1 parent 9537a44 commit 1ee301a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions app/src/util/globalShortcut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -545,7 +545,9 @@ export const globalShortcut = () => {
if (item === window.siyuan.storage[Constants.LOCAL_ZOOM]) {
window.siyuan.storage[Constants.LOCAL_ZOOM] = Constants.SIZE_ZOOM[index + 1] || 3;
webFrame.setZoomFactor(window.siyuan.storage[Constants.LOCAL_ZOOM]);
setStorageVal(Constants.LOCAL_ZOOM, window.siyuan.storage[Constants.LOCAL_ZOOM]);
if (!isTabWindow) {
setStorageVal(Constants.LOCAL_ZOOM, window.siyuan.storage[Constants.LOCAL_ZOOM]);
}
return true;
}
});
Expand All @@ -555,7 +557,9 @@ export const globalShortcut = () => {
if (matchHotKey("⌘0", event)) {
webFrame.setZoomFactor(1);
window.siyuan.storage[Constants.LOCAL_ZOOM] = 1;
setStorageVal(Constants.LOCAL_ZOOM, 1);
if (!isTabWindow) {
setStorageVal(Constants.LOCAL_ZOOM, 1);
}
event.preventDefault();
return;
}
Expand All @@ -564,7 +568,9 @@ export const globalShortcut = () => {
if (item === window.siyuan.storage[Constants.LOCAL_ZOOM]) {
window.siyuan.storage[Constants.LOCAL_ZOOM] = Constants.SIZE_ZOOM[index - 1] || 0.25;
webFrame.setZoomFactor(window.siyuan.storage[Constants.LOCAL_ZOOM]);
setStorageVal(Constants.LOCAL_ZOOM, window.siyuan.storage[Constants.LOCAL_ZOOM]);
if (!isTabWindow) {
setStorageVal(Constants.LOCAL_ZOOM, window.siyuan.storage[Constants.LOCAL_ZOOM]);
}
return true;
}
});
Expand Down

0 comments on commit 1ee301a

Please sign in to comment.