messageTray: Fix close button position in RTL locales

https://bugzilla.gnome.org/show_bug.cgi?id=686879
This commit is contained in:
Florian Müllner 2012-10-25 18:51:43 +02:00
parent 98686e5f7b
commit a598b06496

View File

@ -242,7 +242,10 @@ function makeCloseButton() {
closeButton.connect('style-changed', function() {
let themeNode = closeButton.get_theme_node();
closeButton.translation_x = themeNode.get_length('-shell-close-overlap-x');
// libcroco doesn't support negative units
let direction = closeButton.get_text_direction() == Clutter.TextDirection.RTL ? -1 : 1;
closeButton.translation_x = direction * themeNode.get_length('-shell-close-overlap-x');
// libcroco doesn't support negative units
closeButton.translation_y = -themeNode.get_length('-shell-close-overlap-y');