small fixes

This commit is contained in:
MihailRis
2025-03-11 00:39:59 +03:00
parent 9a01b5ad2d
commit 4c9019e03c
8 changed files with 21 additions and 9 deletions
+6 -2
View File
@@ -301,9 +301,13 @@ const std::string& UINode::getId() const {
void UINode::reposition() {
if (sizefunc) {
auto newSize = sizefunc();
auto defsize = newSize;
if (parent) {
defsize = parent->getSize();
}
setSize(
{newSize.x < 0 ? size.x : newSize.x,
newSize.y < 0 ? size.y : newSize.y}
{newSize.x < 0 ? defsize.x : newSize.x,
newSize.y < 0 ? defsize.y : newSize.y}
);
}
if (positionfunc) {