Skip to content

Commit

Permalink
Making sure that initial size is the same as when calling BrowserWind…
Browse files Browse the repository at this point in the history
…ow.resize on main window
  • Loading branch information
araujoarthur0 authored and thamara committed Jun 3, 2020
1 parent 94921f2 commit 7a643d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion js/classes/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ class CalendarFactory {
let widthHeight = getDefaultWidthHeight();
if (view === 'day') {
if (calendar === undefined || calendar.constructor.name !== 'DayCalendar') {
ipcRenderer.send('RESIZE_MAIN_WINDOW', widthHeight.width, widthHeight.height);
if (calendar !== undefined && calendar.constructor.name !== 'DayCalendar') {
ipcRenderer.send('RESIZE_MAIN_WINDOW', widthHeight.width, widthHeight.height);
}
return new DayCalendar(preferences);
} else {
calendar.updatePreferences(preferences);
Expand Down
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ function createWindow() {
width: widthHeight.width,
height: widthHeight.height,
minWidth: 450,
useContentSize: true,
useContentSize: false,
zoomToPageWidth: true, //MacOS only
icon: iconpath,
show: false,
Expand Down

0 comments on commit 7a643d6

Please sign in to comment.