mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Contrain size in ctor on non-resizable windows
This commit is contained in:
@@ -218,6 +218,12 @@ NativeWindowViews::NativeWindowViews(
|
||||
std::string window_type;
|
||||
if (options.Get(options::kType, &window_type))
|
||||
SetWindowType(GetAcceleratedWidget(), window_type);
|
||||
|
||||
if (!resizable_) {
|
||||
gfx::Size content_size = GetContentSize();
|
||||
SetContentSizeConstraints(
|
||||
extensions::SizeConstraints(content_size, content_size));
|
||||
}
|
||||
#endif
|
||||
|
||||
// Add web view.
|
||||
|
||||
Reference in New Issue
Block a user