mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-13 01:36:22 +00:00
Merge pull request #2178 from enyaxu/feature/2165
Hotkey for toggle editor fullscreen
This commit is contained in:
@@ -4,12 +4,14 @@ import CSSModules from 'browser/lib/CSSModules'
|
||||
import styles from './FullscreenButton.styl'
|
||||
import i18n from 'browser/lib/i18n'
|
||||
|
||||
const OSX = global.process.platform === 'darwin'
|
||||
const hotkey = (OSX ? i18n.__('Command(⌘)') : i18n.__('Ctrl(^)')) + '+B'
|
||||
const FullscreenButton = ({
|
||||
onClick
|
||||
}) => (
|
||||
<button styleName='control-fullScreenButton' title={i18n.__('Fullscreen')} onMouseDown={(e) => onClick(e)}>
|
||||
<img styleName='iconInfo' src='../resources/icon/icon-full.svg' />
|
||||
<span styleName='tooltip'>{i18n.__('Fullscreen')}</span>
|
||||
<span styleName='tooltip'>{i18n.__('Fullscreen')}({hotkey})</span>
|
||||
</button>
|
||||
)
|
||||
|
||||
|
||||
@@ -276,6 +276,19 @@ const view = {
|
||||
mainWindow.setFullScreen(!mainWindow.isFullScreen())
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
label: 'Toggle Side Bar',
|
||||
accelerator: 'CommandOrControl+B',
|
||||
click () {
|
||||
mainWindow.webContents.send('editor:fullscreen')
|
||||
}
|
||||
},
|
||||
{
|
||||
type: 'separator'
|
||||
},
|
||||
{
|
||||
role: 'zoomin',
|
||||
accelerator: macOS ? 'CommandOrControl+Plus' : 'Control+='
|
||||
|
||||
Reference in New Issue
Block a user