Add size(direction, constraint, value).

For example:
============

element
  | size(WIDTH, EQUAL 10);

element
  | size(HEIGHT, GREATER_THAN, 10);

element
  | size(WIDTH, EQUAL, 10)
  | size(HEIGHT, EQUAL, 10)
This commit is contained in:
Arthur Sonzogni
2019-01-20 23:04:10 +01:00
parent fddcbdea65
commit 456ede70fd
10 changed files with 56 additions and 22 deletions

View File

@@ -25,7 +25,10 @@ class MyComponent : public Component {
for(auto& it : checkbox) {
content.push_back(it.Render());
}
return vbox(std::move(content)) | frame | size(20, 10) | border;
return vbox(std::move(content))
| frame
| size(HEIGHT, LESS_THAN, 10)
| border;
}
private: