feat: flexible autoresize for BrowserViews (#16184)
* feat: flexible autoresize for BrowserViews * fix: change to static_cast * Slight format code
This commit is contained in:
parent
927aac306f
commit
49ec7e1582
8 changed files with 115 additions and 25 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue