feat: flexible autoresize for BrowserViews (#16184)

* feat: flexible autoresize for BrowserViews

* fix: change to static_cast

* Slight format code
This commit is contained in:
Vladimir 2019-01-31 05:07:19 +03:00 committed by Cheng Zhao
parent 927aac306f
commit 49ec7e1582
8 changed files with 115 additions and 25 deletions

View file

@ -37,6 +37,14 @@ struct Converter<atom::AutoResizeFlags> {
if (params.Get("height", &height) && height) {
flags |= atom::kAutoResizeHeight;
}
bool horizontal = false;
if (params.Get("horizontal", &horizontal) && horizontal) {
flags |= atom::kAutoResizeHorizontal;
}
bool vertical = false;
if (params.Get("vertical", &vertical) && vertical) {
flags |= atom::kAutoResizeVertical;
}
*auto_resize_flags = static_cast<atom::AutoResizeFlags>(flags);
return true;