[gnome-shell] workspacesView: Refactor thumb zooming out code
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] workspacesView: Refactor thumb zooming out code
- Date: Fri, 24 Aug 2012 02:37:16 +0000 (UTC)
commit efc128e68161bcc44297f021431fd6ead0876ada
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Aug 8 17:21:19 2012 -0300
workspacesView: Refactor thumb zooming out code
https://bugzilla.gnome.org/show_bug.cgi?id=582650
js/ui/workspacesView.js | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 2b5eac5..b8204f0 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -868,15 +868,10 @@ const WorkspacesDisplay = new Lang.Class({
let clipX = rtl ? x + controlsVisible : x;
let clipY = y + (fullHeight - clipHeight) / 2;
- if (this._zoomOut) {
- width -= controlsNatural;
- if (rtl)
- x += controlsNatural;
- } else {
- width -= controlsVisible;
- if (rtl)
- x += controlsVisible;
- }
+ let widthAdjust = this._zoomOut ? controlsNatural : controlsVisible;
+ width -= widthAdjust;
+ if (rtl)
+ x += widthAdjust;
height = (fullHeight / fullWidth) * width;
let difference = fullHeight - height;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]