[gnome-documents] view: center the selected cell alignment when scrolling to selection



commit 10f23e367d9369a38fd069b7bb5a0712a604be35
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Wed Nov 9 16:24:05 2011 -0500

    view: center the selected cell alignment when scrolling to selection
    
    Use 0.5 as align here instead of 0.0, so the elements we're scrolling
    to appear centered in the view.

 src/iconView.js |    2 +-
 src/listView.js |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/iconView.js b/src/iconView.js
index f9d7fbc..ea8d32a 100644
--- a/src/iconView.js
+++ b/src/iconView.js
@@ -79,7 +79,7 @@ IconView.prototype = {
     },
 
     scrollToPath: function(path) {
-        this.widget.scroll_to_path(path, false, 0, 0);
+        this.widget.scroll_to_path(path, true, 0.5, 0.5);
     },
 
     createRenderers: function() {
diff --git a/src/listView.js b/src/listView.js
index a8ed48c..6c14b08 100644
--- a/src/listView.js
+++ b/src/listView.js
@@ -71,7 +71,7 @@ ListView.prototype = {
     },
 
     scrollToPath: function(path) {
-        this.widget.scroll_to_cell(path, null, false, 0, 0);
+        this.widget.scroll_to_cell(path, null, true, 0.5, 0.5);
     },
 
     setSelectionMode: function(mode) {



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