mirror of https://github.com/laurent22/joplin.git
* added toggleLayout logic * added id * improved codepull/2728/head
parent
9027f3fb10
commit
bd6e77bf32
|
@ -963,6 +963,7 @@ class Application extends BaseApplication {
|
|||
});
|
||||
},
|
||||
}, {
|
||||
id: 'view:toggleLayout',
|
||||
label: _('Toggle editor layout'),
|
||||
screens: ['Main'],
|
||||
accelerator: 'CommandOrControl+L',
|
||||
|
@ -1185,6 +1186,8 @@ class Application extends BaseApplication {
|
|||
menuItem.enabled = !isHtmlNote && layout !== 'viewer' && !!note;
|
||||
}
|
||||
|
||||
const toggleLayout = Menu.getApplicationMenu().getMenuItemById('view:toggleLayout');
|
||||
toggleLayout.enabled = !!note;
|
||||
const menuItem = Menu.getApplicationMenu().getMenuItemById('help:toggleDevTools');
|
||||
menuItem.checked = state.devToolsVisible;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue