[gnome-shell/wip/fmuellner/notification-redux: 65/88] calendar: Fix rounding error in ScaleLayout



commit be1fda3786bce59a1362f78072ece3813ca19b79
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Feb 13 20:38:00 2015 +0100

    calendar: Fix rounding error in ScaleLayout

 js/ui/calendar.js |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/calendar.js b/js/ui/calendar.js
index c280d89..647affa 100644
--- a/js/ui/calendar.js
+++ b/js/ui/calendar.js
@@ -1092,14 +1092,16 @@ const ScaleLayout = new Lang.Class({
         this._connectContainer(container);
 
         let [min, nat] = this.parent(container, forHeight);
-        return [min * container.scale_x, nat * container.scale_x];
+        return [Math.floor(min * container.scale_x),
+                Math.floor(nat * container.scale_x)];
     },
 
     vfunc_get_preferred_height: function(container, forWidth) {
         this._connectContainer(container);
 
         let [min, nat] = this.parent(container, forWidth);
-        return [min * container.scale_y, nat * container.scale_y];
+        return [Math.floor(min * container.scale_y),
+                Math.floor(nat * container.scale_y)];
     }
 });
 


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