File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -232,7 +232,7 @@ function createWindow() {
232232 mainWindow = new BrowserWindow ( {
233233 width : Math . round ( 590 / screen . getPrimaryDisplay ( ) . scaleFactor ) ,
234234 maxWidth : Math . round ( 590 / screen . getPrimaryDisplay ( ) . scaleFactor ) ,
235- height : Math . round ( 720 / screen . getPrimaryDisplay ( ) . scaleFactor ) ,
235+ height : Math . round ( ( store . get ( 'app.windowHeight' , 720 ) ) / screen . getPrimaryDisplay ( ) . scaleFactor ) ,
236236 minHeight : Math . round ( 500 / screen . getPrimaryDisplay ( ) . scaleFactor ) ,
237237 resizable : true ,
238238 frame : false ,
@@ -256,6 +256,12 @@ function createWindow() {
256256 }
257257 } ) ;
258258
259+ mainWindow . on ( 'resize' , ( ) => {
260+ const [ , height ] = mainWindow . getSize ( ) ;
261+ const physicalHeight = Math . round ( height * screen . getPrimaryDisplay ( ) . scaleFactor ) ;
262+ store . set ( 'app.windowHeight' , physicalHeight ) ;
263+ } ) ;
264+
259265 mainWindow . on ( 'close' , ( e ) => {
260266 if ( ! app . isQuitting ) {
261267 e . preventDefault ( ) ;
You can’t perform that action at this time.
0 commit comments