Skip to content

Commit

Permalink
refactor(window/apple): set initial size in constructor on ios
Browse files Browse the repository at this point in the history
  • Loading branch information
jwerle committed May 7, 2024
1 parent 1355eb9 commit bcc21a1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/window/apple.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1103,6 +1103,14 @@ - (void) webView: (WKWebView*) webview
}
}

if (opts.width > 0 && opts.height > 0) {
this->setSize(opts.height, opts.width);
} else if (opts.width > 0) {
this->setSize(window.frame.size.height, opts.width);
} else if (opts.height > 0) {
this->setSize(opts.height, window.frame.size.width);
}

this->bridge.configureWebView(this->webview);
#if SSC_PLATFORM_MACOS
// Window style: titled, closable, minimizable
Expand Down

0 comments on commit bcc21a1

Please sign in to comment.