Set resizable on Linux from InitWithOptions
This commit is contained in:
parent
993b878925
commit
7de37859f0
2 changed files with 6 additions and 7 deletions
|
@ -115,6 +115,12 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) {
|
|||
} else {
|
||||
SetSizeConstraints(size_constraints);
|
||||
}
|
||||
#if defined(USE_X11)
|
||||
bool resizable;
|
||||
if (options.Get(options::kResizable, &resizable)) {
|
||||
SetResizable(resizable);
|
||||
}
|
||||
#endif
|
||||
#if defined(OS_WIN) || defined(USE_X11)
|
||||
bool closable;
|
||||
if (options.Get(options::kClosable, &closable)) {
|
||||
|
|
|
@ -120,7 +120,6 @@ NativeWindowViews::NativeWindowViews(
|
|||
minimizable_(true) {
|
||||
options.Get(options::kTitle, &title_);
|
||||
options.Get(options::kAutoHideMenuBar, &menu_bar_autohide_);
|
||||
options.Get(options::kResizable, &resizable_);
|
||||
|
||||
#if defined(OS_WIN)
|
||||
// On Windows we rely on the CanResize() to indicate whether window can be
|
||||
|
@ -218,12 +217,6 @@ 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.
|
||||
|
|
Loading…
Add table
Reference in a new issue