workspace: Move close button to the left in RTL locales
Mutter reverses the button layout in RTL locales, so we should do the same for the window previews' close buttons. https://bugzilla.gnome.org/show_bug.cgi?id=643834
This commit is contained in:
parent
614176b269
commit
cf85477864
@ -419,8 +419,13 @@ WindowOverlay.prototype = {
|
|||||||
let button = this.closeButton;
|
let button = this.closeButton;
|
||||||
let title = this.title;
|
let title = this.title;
|
||||||
|
|
||||||
let buttonX = cloneX + cloneWidth - button._overlap;
|
let buttonX;
|
||||||
let buttonY = cloneY - button.height + button._overlap;
|
let buttonY = cloneY - (button.height - button._overlap);
|
||||||
|
if (St.Widget.get_default_direction() == St.TextDirection.RTL)
|
||||||
|
buttonX = cloneX - (button.width - button._overlap);
|
||||||
|
else
|
||||||
|
buttonX = cloneX + (cloneWidth - button._overlap);
|
||||||
|
|
||||||
button.set_position(Math.floor(buttonX), Math.floor(buttonY));
|
button.set_position(Math.floor(buttonX), Math.floor(buttonY));
|
||||||
|
|
||||||
if (!title.fullWidth)
|
if (!title.fullWidth)
|
||||||
|
Loading…
Reference in New Issue
Block a user