Skip to content

Commit

Permalink
Fixed menus on macOS
Browse files Browse the repository at this point in the history
Fixed menus of child windows on macOS
  • Loading branch information
amanharwara committed Feb 26, 2019
1 parent 94339d7 commit cbe7068
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 32 deletions.
29 changes: 1 addition & 28 deletions src/windows/about/js/about.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,11 @@ const {
ipcRenderer
} = require('electron');

const linksMenu = new Menu();

linksMenu.append(new MenuItem({
label: 'Links',
submenu: [{
label: 'Website',
click: () => {
ipcRenderer.send('link-open', 'https://shadythgod.github.io');
}
}, {
label: 'GitHub',
click: () => {
ipcRenderer.send('link-open', 'https://www.github.com/shadythgod');
}
}, {
label: 'Repository',
click: () => {
ipcRenderer.send('link-open', 'https://www.github.com/shadythgod/altus');
}
}, {
label: 'My Instagram',
click: () => {
ipcRenderer.send('link-open', 'https://www.instagram.com/aman_harwara');
}
}]
}));

// Create main window titlebar
const mainTitlebar = new customTitlebar.Titlebar({
backgroundColor: customTitlebar.Color.fromHex('#21252B'),
icon: '../assets/icons/icon.ico',
menu: linksMenu,
menu: process.platform === 'darwin' ? Menu.getApplicationMenu() : new Menu(),
minimizable: false,
maximizable: false,
closeable: true
Expand Down
2 changes: 1 addition & 1 deletion src/windows/customCSS/js/customCSS.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const {
const mainTitlebar = new customTitlebar.Titlebar({
backgroundColor: customTitlebar.Color.fromHex('#21252B'),
icon: '../assets/icons/icon.ico',
menu: new Menu(),
menu: process.platform === 'darwin' ? Menu.getApplicationMenu() : new Menu(),
minimizable: false,
maximizable: false,
closeable: true
Expand Down
2 changes: 1 addition & 1 deletion src/windows/settings/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const settings = new Store({
const mainTitlebar = new customTitlebar.Titlebar({
backgroundColor: customTitlebar.Color.fromHex('#21252B'),
icon: '../assets/icons/icon.ico',
menu: new Menu(),
menu: process.platform === 'darwin' ? Menu.getApplicationMenu() : new Menu(),
minimizable: false,
maximizable: false,
closeable: true
Expand Down
2 changes: 1 addition & 1 deletion src/windows/themeCustomizer/js/themeCustomizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ let cssClipboard = new ClipboardJS('#copy-css-button');
const mainTitlebar = new customTitlebar.Titlebar({
backgroundColor: customTitlebar.Color.fromHex('#21252B'),
icon: '../assets/icons/icon.ico',
menu: new Menu(),
menu: process.platform === 'darwin' ? Menu.getApplicationMenu() : new Menu(),
minimizable: false,
maximizable: false,
closeable: true
Expand Down
2 changes: 1 addition & 1 deletion src/windows/themeManager/js/themeManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Store = require('electron-store');
const mainTitlebar = new customTitlebar.Titlebar({
backgroundColor: customTitlebar.Color.fromHex('#21252B'),
icon: '../assets/icons/icon.ico',
menu: new Menu(),
menu: process.platform === 'darwin' ? Menu.getApplicationMenu() : new Menu(),
minimizable: false,
maximizable: false,
closeable: true
Expand Down

0 comments on commit cbe7068

Please sign in to comment.