Enable setting only one side of max/min size, fixes #1301
This commit is contained in:
parent
a4342fd5ba
commit
ae5586408f
1 changed files with 2 additions and 2 deletions
|
@ -204,8 +204,8 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) {
|
|||
options.Get(switches::kMinWidth, &min_width)) {
|
||||
SetMinimumSize(gfx::Size(min_width, min_height));
|
||||
}
|
||||
int max_height = -1, max_width = -1;
|
||||
if (options.Get(switches::kMaxHeight, &max_height) &&
|
||||
int max_height = INT_MAX, max_width = INT_MAX;
|
||||
if (options.Get(switches::kMaxHeight, &max_height) |
|
||||
options.Get(switches::kMaxWidth, &max_width)) {
|
||||
SetMaximumSize(gfx::Size(max_width, max_height));
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue