Fixed issue with window resizing

This commit is contained in:
Devine Lu Linvega 2019-07-18 19:33:32 +09:00
parent ad941de3a1
commit 61d34036cd
3 changed files with 5 additions and 4 deletions

View File

@ -173,7 +173,7 @@ function Library (ronin) {
for (let i = acc === undefined ? 1 : 0; i < length; i++) { for (let i = acc === undefined ? 1 : 0; i < length; i++) {
result = await fn(result, arr[i], i, arr) result = await fn(result, arr[i], i, arr)
} }
return result; return result
} }
this.len = (item) => { // Returns the length of a list. this.len = (item) => { // Returns the length of a list.

View File

@ -182,7 +182,8 @@ function Surface (ronin) {
this.fitWindow = function (size) { this.fitWindow = function (size) {
const win = require('electron').remote.getCurrentWindow() const win = require('electron').remote.getCurrentWindow()
const pad = { w: ronin.commander.isVisible === true ? 400 : 60, h: 60 } const pad = { w: ronin.commander.isVisible === true ? 400 : 60, h: 60 }
win.setSize(size.w + pad.w, size.h + pad.h, true) if (size.w < 10 || size.h < 10) { return }
win.setSize(Math.floor(size.w + pad.w), Math.floor(size.h + pad.h), true)
} }
this.maximize = function () { this.maximize = function () {