diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css index 08f636f50..0bd1566b6 100644 --- a/data/theme/gnome-shell.css +++ b/data/theme/gnome-shell.css @@ -196,10 +196,20 @@ StTooltip StLabel { padding-right: 4px; } +#panelLeft:rtl { + padding-right: 0px; + padding-left: 4px; +} + #panelRight { padding-left: 4px; } +#panelRight:rtl { + padding-left: 0px; + padding-right: 4px; +} + #appMenu { spacing: 4px; } diff --git a/js/ui/panel.js b/js/ui/panel.js index 2b315993d..41bb04486 100644 --- a/js/ui/panel.js +++ b/js/ui/panel.js @@ -528,6 +528,13 @@ Panel.prototype = { this._centerBox = new St.BoxLayout({ name: 'panelCenter' }); this._rightBox = new St.BoxLayout({ name: 'panelRight' }); + // This will eventually be automatic, see + // https://bugzilla.gnome.org/show_bug.cgi?id=584662 + if (St.Widget.get_default_direction() == St.TextDirection.RTL) { + this._leftBox.add_style_pseudo_class('rtl'); + this._rightBox.add_style_pseudo_class('rtl'); + } + /* This box container ensures that the centerBox is positioned in the *absolute* * center, but can be pushed aside if necessary. */ this._boxContainer = new Shell.GenericContainer();