По какой-то причине setMinimumSize
устанавливает useContentSize
на undefined
. Он также не увеличивает окно до минимального размера, если оно меньше минимального размера.
const { remote } = require('electron')
remote.getCurrentWindow().setMinimumSize(X, Y)
// Here is a rough solution to the second problem.
let width, height
width = innerWidth < X ? X : innerWidth
height = innerHeight < Y ? Y : innerHeight
remote.getCurrentWindow().setContentSize(width, height)
Кто-нибудь знает, как решить проблему useContentSize
?
Здесь - ссылка на отчет об ошибке на GitHub.