fix manual placement for RTL locales
https://bugzilla.gnome.org/show_bug.cgi?id=584662
This commit is contained in:
parent
216dafd5b1
commit
ec36a0070e
@ -308,6 +308,7 @@ Overview.prototype = {
|
|||||||
|
|
||||||
relayout: function () {
|
relayout: function () {
|
||||||
let primary = global.get_primary_monitor();
|
let primary = global.get_primary_monitor();
|
||||||
|
let rtl = (St.Widget.get_default_direction () == St.TextDirection.RTL);
|
||||||
|
|
||||||
this._recalculateGridSizes();
|
this._recalculateGridSizes();
|
||||||
|
|
||||||
@ -329,10 +330,19 @@ Overview.prototype = {
|
|||||||
this._workspacesHeight = Math.floor(displayGridRowHeight * workspaceRowsUsed
|
this._workspacesHeight = Math.floor(displayGridRowHeight * workspaceRowsUsed
|
||||||
- WORKSPACE_GRID_PADDING * (primary.height / primary.width) * 2);
|
- WORKSPACE_GRID_PADDING * (primary.height / primary.width) * 2);
|
||||||
|
|
||||||
|
if (rtl) {
|
||||||
|
this._workspacesX = WORKSPACE_GRID_PADDING;
|
||||||
|
} else {
|
||||||
this._workspacesX = displayGridColumnWidth + WORKSPACE_GRID_PADDING;
|
this._workspacesX = displayGridColumnWidth + WORKSPACE_GRID_PADDING;
|
||||||
|
}
|
||||||
this._workspacesY = Math.floor(displayGridRowHeight + WORKSPACE_GRID_PADDING * (primary.height / primary.width));
|
this._workspacesY = Math.floor(displayGridRowHeight + WORKSPACE_GRID_PADDING * (primary.height / primary.width));
|
||||||
|
|
||||||
|
if (rtl) {
|
||||||
|
this._dash.actor.set_position(primary.width - displayGridColumnWidth, contentY);
|
||||||
|
} else {
|
||||||
this._dash.actor.set_position(0, contentY);
|
this._dash.actor.set_position(0, contentY);
|
||||||
|
}
|
||||||
|
|
||||||
this._dash.actor.set_size(displayGridColumnWidth, contentHeight);
|
this._dash.actor.set_size(displayGridColumnWidth, contentHeight);
|
||||||
this._dash.searchArea.height = this._workspacesY - contentY;
|
this._dash.searchArea.height = this._workspacesY - contentY;
|
||||||
this._dash.sectionArea.height = this._workspacesHeight;
|
this._dash.sectionArea.height = this._workspacesHeight;
|
||||||
@ -356,6 +366,11 @@ Overview.prototype = {
|
|||||||
this._workspacesY);
|
this._workspacesY);
|
||||||
// Dynamic width
|
// Dynamic width
|
||||||
this._paneContainer.height = this._workspacesHeight;
|
this._paneContainer.height = this._workspacesHeight;
|
||||||
|
if (rtl) {
|
||||||
|
this._paneContainer.connect('notify::width', Lang.bind(this, function (paneContainer) {
|
||||||
|
paneContainer.x = this._dash.actor.x - (DEFAULT_PADDING + paneContainer.width);
|
||||||
|
}));
|
||||||
|
}
|
||||||
|
|
||||||
this._transparentBackground.set_position(this._paneContainer.x, this._paneContainer.y);
|
this._transparentBackground.set_position(this._paneContainer.x, this._paneContainer.y);
|
||||||
this._transparentBackground.set_size(primary.width - this._paneContainer.x,
|
this._transparentBackground.set_size(primary.width - this._paneContainer.x,
|
||||||
|
Loading…
Reference in New Issue
Block a user