mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-16 22:50:13 +01:00
This commit is contained in:
parent
26c3ce610e
commit
db5d0962ba
2 changed files with 31 additions and 7 deletions
|
|
@ -441,6 +441,24 @@ const boot = () => {
|
|||
|
||||
resetTrayMenu()
|
||||
}
|
||||
const setWndTopMenu = {
|
||||
label: trayMenu.cancelWindowTop,
|
||||
click: () => {
|
||||
setCancelWndTop()
|
||||
},
|
||||
}
|
||||
const setCancelWndTop = () => {
|
||||
if (!mainWindow.isAlwaysOnTop()) {
|
||||
mainWindow.setAlwaysOnTop(true)
|
||||
setWndTopMenu.label = trayMenu.cancelWindowTop
|
||||
} else {
|
||||
mainWindow.setAlwaysOnTop(false)
|
||||
setWndTopMenu.label = trayMenu.setWindowTop
|
||||
}
|
||||
|
||||
resetTrayMenu()
|
||||
}
|
||||
|
||||
|
||||
const buildTrayMenuTemplate = () => {
|
||||
let ret = [
|
||||
|
|
@ -477,13 +495,7 @@ const boot = () => {
|
|||
let changeWndTop = {
|
||||
label: trayMenu.setWindowTop,
|
||||
click: () => {
|
||||
if (!mainWindow.isAlwaysOnTop()) {
|
||||
mainWindow.setAlwaysOnTop(true)
|
||||
changeWndTop.label = trayMenu.cancelWindowTop
|
||||
} else {
|
||||
mainWindow.setAlwaysOnTop(false)
|
||||
changeWndTop.label = trayMenu.setWindowTop
|
||||
}
|
||||
|
||||
},
|
||||
};
|
||||
ret.splice(1, 0, changeWndTop)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue