fix: pass down the bool value of enableAutoSize to setSize (#13282)

* fix: pass the boolean value of enableAutoSize to setSize

The webContents setSize API takes in an optional enableAutoSize boolean.
Looking in the code, if that property is set, regardless if you pass in
true or false, it will always set it to true. This change passes the
appropriate boolean value down properly.

* creating new bool for autosize
This commit is contained in:
Justin Guze 2018-06-19 08:38:55 -07:00 committed by Charles Kerr
parent 13f97b4cae
commit 137aaf2429

View file

@ -130,7 +130,7 @@ struct Converter<atom::SetSizeParams> {
return false;
bool autosize;
if (params.Get("enableAutoSize", &autosize))
out->enable_auto_size.reset(new bool(true));
out->enable_auto_size.reset(new bool(autosize));
gfx::Size size;
if (params.Get("min", &size))
out->min_size.reset(new gfx::Size(size));