Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

chore: adjust the window size to its content not to show scroll bar #1883

Merged
merged 3 commits into from
Apr 9, 2020
Merged
Changes from all commits
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
7 changes: 4 additions & 3 deletions src/main/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ export default function ({ createLoadingWindow }) {
const about = {
label: 'About',
click: () => aboutWindow({
adjust_window_size: true,
icon_path: isProduction
? path.resolve(__dirname, './static/128x128.png')
: path.resolve(__dirname, '../../build/icons/128x128.png'),
copyright: [
`<p style="text-align: center">Distributed under ${packageJson.license} license</p>`,
'<p>Flag icons made by <a href="http://www.freepik.com/" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">flaticon.com</a> are licensed by <a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a></p>'
'<p>Flag icons made by <a href="https://www.freepik.com/" title="Freepik">Freepik</a> from <a href="https://www.flaticon.com/" title="Flaticon">flaticon.com</a> are licensed by <a href="https://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0">CC 3.0 BY</a></p>'
],
package_json_dir: path.resolve(__dirname, '../../'),
css_path: isProduction ? path.resolve(__dirname, 'styles.css') : null,
Expand All @@ -30,12 +31,12 @@ export default function ({ createLoadingWindow }) {
submenu: [
{
label: 'Settings',
accelerator: 'CmdOrCtrl+,',
click: (_, focusedWindow) => {
if (focusedWindow && focusedWindow.webContents) {
focusedWindow.webContents.send('app:preferences')
}
},
accelerator: 'CommandOrControl+,'
}
}
]
}
Expand Down