Throw if set_child is called for default arrow button
This commit is contained in:
parent
bfb8ba407b
commit
9c744b9a21
1 changed files with 5 additions and 0 deletions
|
|
@ -581,6 +581,11 @@ namespace psemek::ui
|
|||
: direction_{direction}
|
||||
{}
|
||||
|
||||
std::shared_ptr<element> set_child(std::shared_ptr<element>) override
|
||||
{
|
||||
throw std::runtime_error("default arrow button doesn't support children");
|
||||
}
|
||||
|
||||
geom::box<float, 2> size_constraints() const override
|
||||
{
|
||||
auto b = button::size_constraints();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue