[gnome-shell] workspace: Move close button to the left in RTL locales
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspace: Move close button to the left in RTL locales
- Date: Fri, 4 Mar 2011 21:48:36 +0000 (UTC)
commit cf854778643028fdfa2b441076488f6ce7ee3590
Author: Florian Müllner <fmuellner gnome org>
Date: Fri Mar 4 01:08:59 2011 +0100
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
js/ui/workspace.js | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/workspace.js b/js/ui/workspace.js
index 5babb01..d75794f 100644
--- a/js/ui/workspace.js
+++ b/js/ui/workspace.js
@@ -419,8 +419,13 @@ WindowOverlay.prototype = {
let button = this.closeButton;
let title = this.title;
- let buttonX = cloneX + cloneWidth - button._overlap;
- let buttonY = cloneY - button.height + button._overlap;
+ let buttonX;
+ 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));
if (!title.fullWidth)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]