[gnome-maps] UserLocation: pixel-align pin and bubble translation



commit 8bdfced5bfacd9724a7c8c788498fb6cdc16525e
Author: Jussi Kukkonen <jku goto fi>
Date:   Sat Apr 20 15:41:10 2013 +0300

    UserLocation: pixel-align pin and bubble translation
    
    Avoid non-pixel-aligned actors as that leads to blurry text rendering.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=698282

 src/userLocation.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/userLocation.js b/src/userLocation.js
index 9efa3fb..8409d12 100644
--- a/src/userLocation.js
+++ b/src/userLocation.js
@@ -42,7 +42,8 @@ const UserLocation = new Lang.Class({
         this._locationMarker.set_location(this.latitude, this.longitude);
         this._locationMarker.connect('notify::size', Lang.bind(this,
             function() {
-                this._locationMarker.set_translation(-(this._locationMarker.get_width() / 2),
+                let translate_x = -Math.floor(this._locationMarker.get_width() / 2);
+                this._locationMarker.set_translation(translate_x,
                                                      -this._locationMarker.get_height(),
                                                      0);
             }));


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]