[gnome-documents] load-more: add a padding for the area revealing the button
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] load-more: add a padding for the area revealing the button
- Date: Fri, 27 Jan 2012 15:38:37 +0000 (UTC)
commit 082fb4c556b02fb7457568b3f036e1e2b9e0dbdb
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Tue Jan 24 00:44:13 2012 -0500
load-more: add a padding for the area revealing the button
Makes the whole button experience a lot smoother. It also gives time to
the scrolled window to resize appropriately.
src/embed.js | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/embed.js b/src/embed.js
index 16f92aa..773cc4c 100644
--- a/src/embed.js
+++ b/src/embed.js
@@ -318,6 +318,7 @@ ViewEmbed.prototype = {
_onScrolledWinChange: function() {
let vScrollbar = this._scrolledWinView.get_vscrollbar();
let adjustment = this._scrolledWinView.vadjustment;
+ let revealAreaHeight = 32;
// if there's no vscrollbar, or if it's not visible, hide the button
if (!vScrollbar ||
@@ -336,7 +337,7 @@ ViewEmbed.prototype = {
if ((value == 0) && (upper == 1) && (page_size == 1))
end = false;
else
- end = !(adjustment.value < (adjustment.upper - adjustment.page_size));
+ end = !(value < (upper - page_size - revealAreaHeight));
this._loadMore.setBlock(!end);
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]