gui fixes

This commit is contained in:
MihailRis
2024-04-17 01:25:09 +03:00
parent e059b9395f
commit fbc2cc5ce9
3 changed files with 17 additions and 4 deletions
+2 -2
View File
@@ -229,7 +229,7 @@ void UINode::setGravity(Gravity gravity) {
switch (gravity) {
case Gravity::top_left:
case Gravity::center_left:
case Gravity::bottom_left: x = parentSize.x+margin.x; break;
case Gravity::bottom_left: x = margin.x; break;
case Gravity::top_center:
case Gravity::center_center:
case Gravity::bottom_center: x = (parentSize.x-size.x)/2.0f; break;
@@ -241,7 +241,7 @@ void UINode::setGravity(Gravity gravity) {
switch (gravity) {
case Gravity::top_left:
case Gravity::top_center:
case Gravity::top_right: y = parentSize.y+margin.y; break;
case Gravity::top_right: y = margin.y; break;
case Gravity::center_left:
case Gravity::center_center:
case Gravity::center_right: y = (parentSize.y-size.y)/2.0f; break;
+1
View File
@@ -199,6 +199,7 @@ void Panel::fullRefresh() {
}
void Panel::add(std::shared_ptr<UINode> node) {
node->setResizing(true);
Container::add(node);
fullRefresh();
}