Set minimum window size

main
Isaiah Odhner 2018-11-16 02:34:12 -05:00
parent 3c675bef1b
commit fd22722f5a
2 changed files with 7 additions and 2 deletions

View File

@ -16,8 +16,13 @@ let mainWindow;
const createWindow = () => { const createWindow = () => {
// Create the browser window. // Create the browser window.
mainWindow = new BrowserWindow({ mainWindow = new BrowserWindow({
useContentSize: true,
autoHideMenuBar: true, // it adds height for a native menu bar unless we hide it here
// setMenu(null) below is too late; it's already decided on the size by then
width: 800, width: 800,
height: 600, height: 600,
minWidth: 260,
minHeight: 360,
icon: require("path").join(__dirname, "../images/icons", icon: require("path").join(__dirname, "../images/icons",
process.platform === "win32" ? process.platform === "win32" ?
"windows.ico" : "windows.ico" :

View File

@ -51,7 +51,7 @@ html, body, .jspaint {
.jspaint > .vertical { .jspaint > .vertical {
height: 100%; height: 100%;
} }
@media (max-width: 300px) { @media (max-width: 200px) {
.horizontal > .component-area { .horizontal > .component-area {
display: none; display: none;
} }
@ -61,7 +61,7 @@ html, body, .jspaint {
display: none; display: none;
} }
} }
@media (max-height: 370px) { @media (max-height: 359px) {
.vertical > .status-area { .vertical > .status-area {
display: none !important; display: none !important;
} }