mirror of
https://github.com/marktext/marktext.git
synced 2025-05-03 07:50:52 +08:00
Fix sidebar and tabbar won't toggle (#557)
This commit is contained in:
parent
4789c7b119
commit
d0c4763e7e
@ -69,7 +69,12 @@ let viewMenu = {
|
||||
accelerator: keybindings.getAccelerator('viewToggleSideBar'),
|
||||
type: 'checkbox',
|
||||
checked: false,
|
||||
click (item, browserWindow) {
|
||||
click (item, browserWindow, event) {
|
||||
// if we call this function, the checked state is not set
|
||||
if (!event) {
|
||||
item.checked = !item.checked
|
||||
}
|
||||
|
||||
actions.layout(item, browserWindow, 'showSideBar')
|
||||
}
|
||||
}, {
|
||||
@ -78,7 +83,12 @@ let viewMenu = {
|
||||
accelerator: keybindings.getAccelerator('viewToggleTabBar'),
|
||||
type: 'checkbox',
|
||||
checked: false,
|
||||
click (item, browserWindow) {
|
||||
click (item, browserWindow, event) {
|
||||
// if we call this function, the checked state is not set
|
||||
if (!event) {
|
||||
item.checked = !item.checked
|
||||
}
|
||||
|
||||
actions.layout(item, browserWindow, 'showTabBar')
|
||||
}
|
||||
}, {
|
||||
|
Loading…
Reference in New Issue
Block a user