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: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2247>
This commit is contained in:
parent
421591359f
commit
35120dd69c
@ -2649,6 +2649,9 @@ st_theme_node_get_text_align(StThemeNode *node)
|
|||||||
}
|
}
|
||||||
if(node->parent_node)
|
if(node->parent_node)
|
||||||
return st_theme_node_get_text_align(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;
|
return ST_TEXT_ALIGN_LEFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user