[gnome-shell] overview: avoid round-off errors when sizing and positioning view selector
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] overview: avoid round-off errors when sizing and positioning view selector
- Date: Mon, 21 Feb 2011 17:21:27 +0000 (UTC)
commit 9c4cee787560027c36e0e1d375c5ceff047c3837
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Mon Feb 21 09:32:35 2011 -0500
overview: avoid round-off errors when sizing and positioning view selector
We need the view selector to extend all the way to the right edge of the
monitor, so size and position the view selector in a way that the sum of
its X position and its width add up to the primary monitor width.
https://bugzilla.gnome.org/show_bug.cgi?id=642834
js/ui/overview.js | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/overview.js b/js/ui/overview.js
index 843d8f2..fd2266b 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -437,11 +437,11 @@ Overview.prototype = {
this._coverPane.set_position(0, contentY);
this._coverPane.set_size(primary.width, contentHeight);
- let viewWidth = (1.0 - DASH_SPLIT_FRACTION) * primary.width - this._spacing;
+ let dashWidth = Math.round(DASH_SPLIT_FRACTION * primary.width);
+ let viewWidth = primary.width - dashWidth - this._spacing;
let viewHeight = contentHeight - 2 * this._spacing;
let viewY = contentY + this._spacing;
- let viewX = rtl ? 0
- : Math.floor(DASH_SPLIT_FRACTION * primary.width) + this._spacing;
+ let viewX = rtl ? 0 : dashWidth + this._spacing;
// Set the dash's x position - y is handled by a constraint
let dashX;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]