panel: Adjust CSS for RTL locales
The groups at the panel sides use different left/right padding, so a slightly different CSS is required for RTL locales. Add :rtl pseudo classes as necessary and adjust the CSS. https://bugzilla.gnome.org/show_bug.cgi?id=642697
This commit is contained in:
parent
473dad0c3e
commit
0a94c01f83
@ -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;
|
||||
}
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user