feat: updated engine
This commit is contained in:
parent
cbe99774ff
commit
f4cf6b3999
6607 changed files with 910135 additions and 430025 deletions
|
|
@ -41,13 +41,8 @@ Size2 MarginContainer::get_minimum_size() const {
|
|||
continue;
|
||||
}
|
||||
|
||||
Size2 s = c->get_combined_minimum_size();
|
||||
if (s.width > max.width) {
|
||||
max.width = s.width;
|
||||
}
|
||||
if (s.height > max.height) {
|
||||
max.height = s.height;
|
||||
}
|
||||
Size2 s = c->get_bound_minimum_size();
|
||||
max = max.max(s);
|
||||
}
|
||||
|
||||
max.width += (theme_cache.margin_left + theme_cache.margin_right);
|
||||
|
|
@ -56,6 +51,34 @@ Size2 MarginContainer::get_minimum_size() const {
|
|||
return max;
|
||||
}
|
||||
|
||||
Size2 MarginContainer::get_desired_size() const {
|
||||
Size2 ds;
|
||||
|
||||
for (int i = 0; i < get_child_count(); i++) {
|
||||
Control *c = as_sortable_control(get_child(i), SortableVisibilityMode::VISIBLE);
|
||||
if (!c) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Size2 s = c->get_desired_size();
|
||||
ds = ds.max(s);
|
||||
}
|
||||
|
||||
ds.width += (theme_cache.margin_left + theme_cache.margin_right);
|
||||
ds.height += (theme_cache.margin_top + theme_cache.margin_bottom);
|
||||
|
||||
return ds;
|
||||
}
|
||||
|
||||
Size2 MarginContainer::get_inner_combined_maximum_size() const {
|
||||
Size2 ms = Container::get_inner_combined_maximum_size();
|
||||
|
||||
ms.width -= (theme_cache.margin_left + theme_cache.margin_right);
|
||||
ms.height -= (theme_cache.margin_top + theme_cache.margin_bottom);
|
||||
|
||||
return ms;
|
||||
}
|
||||
|
||||
Vector<int> MarginContainer::get_allowed_size_flags_horizontal() const {
|
||||
Vector<int> flags;
|
||||
flags.append(SIZE_FILL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue