[gnome-shell] Fix ripple animation for RTL locales
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] Fix ripple animation for RTL locales
- Date: Tue, 22 Mar 2011 18:38:07 +0000 (UTC)
commit 12fad6f05f7b2183317dd35db95d479c8e44f5f5
Author: Abderrahim Kitouni <a kitouni gmail com>
Date: Tue Nov 30 16:12:22 2010 +0100
Fix ripple animation for RTL locales
The animation was invisible because it was going out of screen, also
add a mirrored version of the image to the theme.
https://bugzilla.gnome.org/show_bug.cgi?id=584662
data/Makefile.am | 3 ++-
.../{corner-ripple.png => corner-ripple-ltr.png} | Bin 2493 -> 2493 bytes
data/theme/corner-ripple-rtl.png | Bin 0 -> 2386 bytes
data/theme/gnome-shell.css | 6 +++++-
js/ui/panel.js | 2 ++
5 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index b047719..819b15c 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -24,7 +24,8 @@ dist_theme_DATA = \
theme/calendar-today.svg \
theme/close-window.svg \
theme/close.svg \
- theme/corner-ripple.png \
+ theme/corner-ripple-ltr.png \
+ theme/corner-ripple-rtl.png \
theme/dash-placeholder.svg \
theme/filter-selected-ltr.svg \
theme/filter-selected-rtl.svg \
diff --git a/data/theme/corner-ripple.png b/data/theme/corner-ripple-ltr.png
similarity index 100%
rename from data/theme/corner-ripple.png
rename to data/theme/corner-ripple-ltr.png
diff --git a/data/theme/corner-ripple-rtl.png b/data/theme/corner-ripple-rtl.png
new file mode 100644
index 0000000..26cf965
Binary files /dev/null and b/data/theme/corner-ripple-rtl.png differ
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index e26c162..caaa5c4 100644
--- a/data/theme/gnome-shell.css
+++ b/data/theme/gnome-shell.css
@@ -1280,7 +1280,11 @@ StTooltip StLabel {
.ripple-box {
width: 52px;
height: 52px;
- background-image: url("corner-ripple.png");
+ background-image: url("corner-ripple-ltr.png");
+}
+
+.ripple-box:rtl {
+ background-image: url("corner-ripple-rtl.png");
}
.switcher-arrow {
diff --git a/js/ui/panel.js b/js/ui/panel.js
index 5ef212a..8cbceb0 100644
--- a/js/ui/panel.js
+++ b/js/ui/panel.js
@@ -706,6 +706,8 @@ HotCorner.prototype = {
x: x,
y: y });
ripple._opacity = startOpacity;
+ if (ripple.get_direction() == St.TextDirection.RTL)
+ ripple.set_anchor_point_from_gravity(Clutter.Gravity.NORTH_EAST);
Tweener.addTween(ripple, { _opacity: finalOpacity,
scale_x: finalScale,
scale_y: finalScale,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]