From 2afbbb0a8e2f7c45b56457ad52e9151ce371853f Mon Sep 17 00:00:00 2001 From: Sindre Sorhus Date: Mon, 13 Mar 2017 15:38:28 +0700 Subject: [PATCH] Move the dark mode and vibrancy toggle to the View menu --- menu.js | 32 ++++++++++++++++++-------------- readme.md | 4 ++-- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/menu.js b/menu.js index 3fc5c1dd9..30a84b6d4 100644 --- a/menu.js +++ b/menu.js @@ -38,6 +38,16 @@ const viewSubmenu = [ click() { sendAction('zoom-out'); } + }, + { + type: 'separator' + }, + { + label: 'Toggle Dark Mode', + accelerator: 'Cmd+D', + click() { + sendAction('toggle-dark-mode'); + } } ]; @@ -65,7 +75,14 @@ ${process.platform} ${process.arch} ${os.release()}`; } ]; -if (process.platform !== 'darwin') { +if (process.platform === 'darwin') { + viewSubmenu.push({ + label: 'Toggle Vibrancy', + click() { + sendAction('toggle-vibrancy'); + } + }); +} else { helpSubmenu.push({ type: 'separator' }, { @@ -104,19 +121,6 @@ const darwinTpl = [ { type: 'separator' }, - { - label: 'Toggle Dark Mode', - accelerator: 'Cmd+D', - click() { - sendAction('toggle-dark-mode'); - } - }, - { - label: 'Toggle Vibrancy', - click() { - sendAction('toggle-vibrancy'); - } - }, { label: 'Preferences…', accelerator: 'Cmd+,', diff --git a/readme.md b/readme.md index c89b259e0..504cbcb09 100644 --- a/readme.md +++ b/readme.md @@ -37,13 +37,13 @@ If you like to have Caprine minimized on startup, open it from the command-line ### Dark mode -You can toggle dark mode in the `Caprine` menu or with Cmd D / Ctrl D. +You can toggle dark mode in the `View` menu or with Cmd D / Ctrl D. ### Vibrancy -On *macOS*, you can toggle the window vibrancy effect in the `Caprine` menu. +On *macOS*, you can toggle the window vibrancy effect in the `View` menu.