24 lines
583 B
C++
24 lines
583 B
C++
#include <psemek/ui/impl/stack_layout_base.hpp>
|
|
|
|
namespace psemek::ui::impl
|
|
{
|
|
|
|
void stack_layout_base::reshape(geom::box<float, 2> const & new_shape)
|
|
{
|
|
for (auto const & child : children())
|
|
if (child)
|
|
child->reshape(new_shape);
|
|
}
|
|
|
|
geom::interval<float> stack_layout_base::size_constraints(int dimension, float other_dimension_size) const
|
|
{
|
|
auto result = container::size_constraints(dimension, other_dimension_size);
|
|
|
|
for (auto const & child : children())
|
|
if (child)
|
|
result &= child->size_constraints(dimension, other_dimension_size);
|
|
|
|
return result;
|
|
}
|
|
|
|
}
|