[gnome-shell] panel: Adjust CSS for RTL locales
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] panel: Adjust CSS for RTL locales
- Date: Mon, 21 Feb 2011 16:55:28 +0000 (UTC)
commit 0a94c01f83fc9be2bd63493dfc100addab1cc627
Author: Florian Müllner <fmuellner gnome org>
Date: Sat Feb 19 12:21:07 2011 +0100
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
data/theme/gnome-shell.css | 10 ++++++++++
js/ui/panel.js | 7 +++++++
2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index 08f636f..0bd1566 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 2b31599..41bb044 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();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]