From 35120dd69cde1411e3faa44e4136a2bf7aebc3cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sun, 20 Mar 2022 15:22:31 +0100 Subject: [PATCH] st/theme-node: Default to right text-align in RTL When neither the theme node itself nor any of its parents specifies an explicit text direction, we default to aligning to the left. That's a good default for LTR locales, but for RTL aligning to the right is a better one. Part-of: --- src/st/st-theme-node.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/st/st-theme-node.c b/src/st/st-theme-node.c index e6fb80b11..13dbca88f 100644 --- a/src/st/st-theme-node.c +++ b/src/st/st-theme-node.c @@ -2649,6 +2649,9 @@ st_theme_node_get_text_align(StThemeNode *node) } if(node->parent_node) return st_theme_node_get_text_align(node->parent_node); + + if (clutter_get_default_text_direction () == CLUTTER_TEXT_DIRECTION_RTL) + return ST_TEXT_ALIGN_RIGHT; return ST_TEXT_ALIGN_LEFT; }