networkAgent: Fix layout for RTL locales
Unlike StTable, ClutterTableLayout does not take the actor's text direction into account, so mirror columns ourselves now. https://bugzilla.gnome.org/show_bug.cgi?id=731923
This commit is contained in:
parent
256bb532a2
commit
8abd18363c
@ -77,6 +77,7 @@ const NetworkSecretDialog = new Lang.Class({
|
|||||||
layout_manager: layout });
|
layout_manager: layout });
|
||||||
layout.hookup_style(secretTable);
|
layout.hookup_style(secretTable);
|
||||||
|
|
||||||
|
let rtl = secretTable.get_text_direction() == Clutter.TextDirection.RTL;
|
||||||
let initialFocusSet = false;
|
let initialFocusSet = false;
|
||||||
let pos = 0;
|
let pos = 0;
|
||||||
for (let i = 0; i < this._content.secrets.length; i++) {
|
for (let i = 0; i < this._content.secrets.length; i++) {
|
||||||
@ -116,10 +117,15 @@ const NetworkSecretDialog = new Lang.Class({
|
|||||||
} else
|
} else
|
||||||
secret.valid = true;
|
secret.valid = true;
|
||||||
|
|
||||||
layout.pack(label, 0, pos);
|
if (rtl) {
|
||||||
|
layout.pack(secret.entry, 0, pos);
|
||||||
|
layout.pack(label, 1, pos);
|
||||||
|
} else {
|
||||||
|
layout.pack(label, 0, pos);
|
||||||
|
layout.pack(secret.entry, 1, pos);
|
||||||
|
}
|
||||||
layout.child_set(label, { x_expand: false, y_fill: false,
|
layout.child_set(label, { x_expand: false, y_fill: false,
|
||||||
x_align: Clutter.TableAlignment.START });
|
x_align: Clutter.TableAlignment.START });
|
||||||
layout.pack(secret.entry, 1, pos);
|
|
||||||
pos++;
|
pos++;
|
||||||
|
|
||||||
if (secret.password)
|
if (secret.password)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user