19 lines
439 B
C++
19 lines
439 B
C++
#include <psemek/ui/impl/rectangle_base.hpp>
|
|
|
|
namespace psemek::ui::impl
|
|
{
|
|
|
|
geom::interval<float> rectangle_base::size_constraints(int dimension, float other_dimension_size) const
|
|
{
|
|
if (square_ && *square_)
|
|
return {other_dimension_size, other_dimension_size};
|
|
else
|
|
return component::size_constraints(dimension, other_dimension_size);
|
|
}
|
|
|
|
void rectangle_base::update(rectangle const & value)
|
|
{
|
|
square_ = value.square;
|
|
}
|
|
|
|
}
|