date-menu: Adjust boxpointer position for RTL locales
We try to position the boxpointer centered above the calendar, which swaps position with the events list when using a RTL locale, so make the menu alignment dependent on the text direction. https://bugzilla.gnome.org/show_bug.cgi?id=642721
This commit is contained in:
parent
5261304231
commit
edc0cd36c5
@ -56,7 +56,10 @@ DateMenuButton.prototype = {
|
|||||||
//this._eventSource = new Calendar.FakeEventSource();
|
//this._eventSource = new Calendar.FakeEventSource();
|
||||||
this._eventSource = new Calendar.EvolutionEventSource();
|
this._eventSource = new Calendar.EvolutionEventSource();
|
||||||
|
|
||||||
PanelMenu.Button.prototype._init.call(this, 0.25);
|
let menuAlignment = 0.25;
|
||||||
|
if (St.Widget.get_default_direction() == St.TextDirection.RTL)
|
||||||
|
menuAlignment = 1.0 - menuAlignment;
|
||||||
|
PanelMenu.Button.prototype._init.call(this, menuAlignment);
|
||||||
|
|
||||||
this._clock = new St.Label();
|
this._clock = new St.Label();
|
||||||
this.actor.set_child(this._clock);
|
this.actor.set_child(this._clock);
|
||||||
|
Loading…
Reference in New Issue
Block a user