From 0446c4e19addb08359b68875b197e2c9a079bba3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Sat, 16 Jun 2018 18:27:29 -0300 Subject: [PATCH] Layout margin on layout position rule. --HG-- branch : dev --- src/eepp/ui/uirelativelayout.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/eepp/ui/uirelativelayout.cpp b/src/eepp/ui/uirelativelayout.cpp index f79d62a81..81b49cd72 100644 --- a/src/eepp/ui/uirelativelayout.cpp +++ b/src/eepp/ui/uirelativelayout.cpp @@ -73,18 +73,18 @@ void UIRelativeLayout::fixChildPos( UIWidget * widget ) { switch ( widget->getLayoutPositionRule() ) { case LEFT_OF: pos.x = of->getPosition().x - widget->getSize().getWidth() - widget->getLayoutMargin().Right - of->getLayoutMargin().Left; - pos.y = of->getPosition().y; + pos.y = of->getPosition().y + widget->getLayoutMargin().Top; break; case RIGHT_OF: pos.x = of->getPosition().x + of->getSize().getWidth() + widget->getLayoutMargin().Left + of->getLayoutMargin().Right; - pos.y = of->getPosition().y; + pos.y = of->getPosition().y + widget->getLayoutMargin().Top; break; case TOP_OF: - pos.x = of->getPosition().x; + pos.x = of->getPosition().x + widget->getLayoutMargin().Left; pos.y = of->getPosition().y - widget->getSize().getHeight() - widget->getLayoutMargin().Bottom - of->getLayoutMargin().Top; break; case BOTTOM_OF: - pos.x = of->getPosition().x; + pos.x = of->getPosition().x + widget->getLayoutMargin().Left; pos.y = of->getPosition().y + of->getSize().getHeight() + widget->getLayoutMargin().Top + of->getLayoutMargin().Bottom; break; default: