[gnome-shell/wip/fmuellner/notification-redux+sass: 61/122] calendar: Fix rounding error in ScaleLayout
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/fmuellner/notification-redux+sass: 61/122] calendar: Fix rounding error in ScaleLayout
- Date: Tue, 17 Feb 2015 15:09:06 +0000 (UTC)
commit f8d201cfe7f487a11194aaccea64308f7657cfff
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 2d95608..b0adf74 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]