summaryrefslogtreecommitdiff
path: root/src/group_gui.cpp
diff options
context:
space:
mode:
authorPeter Nelson <peter1138@openttd.org>2019-01-27 12:33:54 +0000
committerNiels Martin Hansen <nielsm@indvikleren.dk>2019-01-28 20:29:43 +0100
commitfe37b40385afa809f2c1bb5971b833e314fd1e32 (patch)
tree9ee1cd86fd3e1d5ccfaf278e6bfe6d4ad8877722 /src/group_gui.cpp
parent9f458ecb10cb738c496792a3c378374463125dde (diff)
downloadopenttd-fe37b40385afa809f2c1bb5971b833e314fd1e32.tar.xz
Fix: Group hierarchy not visible in RTL languages.
Diffstat (limited to 'src/group_gui.cpp')
-rw-r--r--src/group_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/group_gui.cpp b/src/group_gui.cpp
index 7db04e9b3..811b46af8 100644
--- a/src/group_gui.cpp
+++ b/src/group_gui.cpp
@@ -260,7 +260,7 @@ private:
str = STR_GROUP_NAME;
}
int x = rtl ? right - WD_FRAMERECT_RIGHT - 8 - this->column_size[VGC_NAME].width + 1 : left + WD_FRAMERECT_LEFT + 8;
- DrawString(x + indent * LEVEL_WIDTH, x + this->column_size[VGC_NAME].width - 1, y + (this->tiny_step_height - this->column_size[VGC_NAME].height) / 2, str, colour);
+ DrawString(x + (rtl ? 0 : indent), x + this->column_size[VGC_NAME].width - 1 - (rtl ? indent : 0), y + (this->tiny_step_height - this->column_size[VGC_NAME].height) / 2, str, colour);
/* draw autoreplace protection */
x = rtl ? x - 8 - this->column_size[VGC_PROTECT].width : x + 8 + this->column_size[VGC_NAME].width;
@@ -582,7 +582,7 @@ public:
assert(g->owner == this->owner);
- DrawGroupInfo(y1, r.left, r.right, g->index, this->indents[i], g->replace_protection);
+ DrawGroupInfo(y1, r.left, r.right, g->index, this->indents[i] * LEVEL_WIDTH, g->replace_protection);
y1 += this->tiny_step_height;
}