Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adjusted menu to display zoom at view root level #863

Merged
merged 2 commits into from
Sep 20, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
129 changes: 60 additions & 69 deletions desktop/menus/view-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,75 +6,6 @@ const buildViewMenu = settings => {
return {
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 @@ -110,6 +41,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 @@ -132,6 +105,24 @@ const buildViewMenu = settings => {
{
type: 'separator',
},
{
label: '&Zoom In',
accelerator: 'CommandOrControl+Plus',
click: appCommandSender({ action: 'increaseFontSize' }),
},
{
label: '&Zoom Out',
mirka marked this conversation as resolved.
Show resolved Hide resolved
accelerator: 'CommandOrControl+-',
click: appCommandSender({ action: 'decreaseFontSize' }),
},
{
label: '&Actual Size',
accelerator: 'CommandOrControl+0',
click: appCommandSender({ action: 'resetFontSize' }),
},
{
type: 'separator',
},
{
label: 'T&oggle Full Screen',
accelerator: (function() {
Expand Down