summaryrefslogtreecommitdiff
path: root/scene/gui/tree.cpp
diff options
context:
space:
mode:
authoryanorax <sheppo21@gmail.com>2017-12-28 21:27:57 +1100
committeryanorax <yanorax@gmail.com>2017-12-29 00:23:57 +1100
commit8627de2794e1194bebdb591f2231f8c34a238762 (patch)
tree51ce7eec57058ee78a9de641961b7292e037a36a /scene/gui/tree.cpp
parent7f1265b41fc52def42c433e5d324070bc6454d6b (diff)
Fix TreeItem cell text alignment
Diffstat (limited to 'scene/gui/tree.cpp')
-rw-r--r--scene/gui/tree.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index 51ad22e271..f4547d400d 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -1009,10 +1009,10 @@ void Tree::draw_item_rect(const TreeItem::Cell &p_cell, const Rect2i &p_rect, co
case TreeItem::ALIGN_LEFT:
break; //do none
case TreeItem::ALIGN_CENTER:
- rect.position.x = MAX(0, (rect.size.width - w) / 2);
+ rect.position.x += MAX(0, (rect.size.width - w) / 2);
break; //do none
case TreeItem::ALIGN_RIGHT:
- rect.position.x = MAX(0, (rect.size.width - w));
+ rect.position.x += MAX(0, (rect.size.width - w));
break; //do none
}