Skip to content

Commit

Permalink
Adjust menu to display Zoom at View root level (#863)
Browse files Browse the repository at this point in the history
* adjusted menu to display zoom at view root level

* Change Zoom In, Zoom Out and Toggle Full Screen access key on Windows. Zoom In to ‘i’ and Zoom Out to ‘o’. However, it will duplicate with Toggle Full Screen which previously was ‘o’, so I changed it to ‘f’
  • Loading branch information
gie3d authored and mirka committed Sep 20, 2018
1 parent 8a7f191 commit 6c6d2c0
Showing 1 changed file with 61 additions and 70 deletions.
131 changes: 61 additions & 70 deletions desktop/menus/view-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,75 +7,6 @@ const buildViewMenu = settings => {
const menu = {
label: '&View',
submenu: [
{
label: '&Note Display',
submenu: [
{
label: '&Comfy',
id: 'comfy',
},
{
label: 'C&ondensed',
id: 'condensed',
},
{
label: '&Expanded',
id: 'expanded',
},
].map(
buildRadioGroup({
action: 'setNoteDisplay',
propName: 'noteDisplay',
settings,
})
),
},
{
label: 'Note &Editor',
submenu: [
{
label: '&Font Size',
submenu: [
// For the oddity with "Command" vs "Cmd"
// Cite: https://github.com/atom/electron/issues/1507
{
label: '&Bigger',
accelerator: 'CommandOrControl+=',
click: appCommandSender({ action: 'increaseFontSize' }),
},
{
label: '&Smaller',
accelerator: 'CommandOrControl+-',
click: appCommandSender({ action: 'decreaseFontSize' }),
},
{
label: '&Reset',
accelerator: 'CommandOrControl+0',
click: appCommandSender({ action: 'resetFontSize' }),
},
],
},
{
label: '&Line Length',
submenu: [
{
label: '&Narrow',
id: 'narrow',
},
{
label: '&Full',
id: 'full',
},
].map(
buildRadioGroup({
action: 'setLineLength',
propName: 'lineLength',
settings,
})
),
},
],
},
{
label: '&Sort Type',
submenu: [
Expand Down Expand Up @@ -111,6 +42,48 @@ const buildViewMenu = settings => {
},
]),
},
{
label: '&Note Display',
submenu: [
{
label: '&Comfy',
id: 'comfy',
},
{
label: 'C&ondensed',
id: 'condensed',
},
{
label: '&Expanded',
id: 'expanded',
},
].map(
buildRadioGroup({
action: 'setNoteDisplay',
propName: 'noteDisplay',
settings,
})
),
},
{
label: '&Line Length',
submenu: [
{
label: '&Narrow',
id: 'narrow',
},
{
label: '&Full',
id: 'full',
},
].map(
buildRadioGroup({
action: 'setLineLength',
propName: 'lineLength',
settings,
})
),
},
{
label: '&Theme',
submenu: [
Expand All @@ -134,7 +107,25 @@ const buildViewMenu = settings => {
type: 'separator',
},
{
label: 'T&oggle Full Screen',
label: 'Zoom &In',
accelerator: 'CommandOrControl+Plus',
click: appCommandSender({ action: 'increaseFontSize' }),
},
{
label: 'Zoom &Out',
accelerator: 'CommandOrControl+-',
click: appCommandSender({ action: 'decreaseFontSize' }),
},
{
label: '&Actual Size',
accelerator: 'CommandOrControl+0',
click: appCommandSender({ action: 'resetFontSize' }),
},
{
type: 'separator',
},
{
label: 'Toggle &Full Screen',
accelerator: (function() {
if (process.platform === 'darwin') {
return 'Ctrl+Command+F';
Expand Down

0 comments on commit 6c6d2c0

Please sign in to comment.