summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/eom-scroll-view.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/eom-scroll-view.c b/src/eom-scroll-view.c
index 6c2bf78..35400be 100644
--- a/src/eom-scroll-view.c
+++ b/src/eom-scroll-view.c
@@ -286,6 +286,7 @@ update_scrollbar_values (EomScrollView *view)
if (gtk_widget_get_visible (GTK_WIDGET (priv->hbar))) {
/* Set scroll increments */
page_size = MIN (scaled_width, allocation.width);
+
page_increment = allocation.width / 2;
step_increment = SCROLL_STEP_SIZE;
@@ -293,7 +294,9 @@ update_scrollbar_values (EomScrollView *view)
lower = 0;
upper = scaled_width;
xofs = CLAMP (priv->xofs, 0, upper - page_size);
- if (gtk_adjustment_get_value (priv->hadj) != xofs) {
+
+ if (gtk_adjustment_get_value (priv->hadj) != xofs
+ || gtk_adjustment_get_page_size (priv->hadj) != page_size) {
value = xofs;
priv->xofs = xofs;
@@ -320,7 +323,8 @@ update_scrollbar_values (EomScrollView *view)
upper = scaled_height;
yofs = CLAMP (priv->yofs, 0, upper - page_size);
- if (gtk_adjustment_get_value (priv->vadj) != yofs) {
+ if (gtk_adjustment_get_value (priv->vadj) != yofs
+ || gtk_adjustment_get_page_size (priv->vadj) != page_size) {
value = yofs;
priv->yofs = yofs;
@@ -2634,4 +2638,4 @@ eom_scroll_view_set_zoom_multiplier (EomScrollView *view,
g_return_if_fail (EOM_IS_SCROLL_VIEW (view));
view->priv->zoom_multiplier = 1.0 + zoom_multiplier;
-} \ No newline at end of file
+}