diff options
author | Sander Sweers <[email protected]> | 2014-05-05 23:52:54 +0200 |
---|---|---|
committer | Sander Sweers <[email protected]> | 2014-05-05 23:52:54 +0200 |
commit | a9876d22c237632fa0fa028698c06903e55eb6e2 (patch) | |
tree | f6ccd9dc5790febba66920e2cc1ffecda3171d96 | |
parent | 37bba554f29007bf9d90c4183834dfe30daf3a56 (diff) | |
parent | 7e732938f96c5ad3416ff23a06d7d6e9e83bca22 (diff) | |
download | eom-a9876d22c237632fa0fa028698c06903e55eb6e2.tar.bz2 eom-a9876d22c237632fa0fa028698c06903e55eb6e2.tar.xz |
Merge pull request #48 from bl0ckeduser/master
Update scrollbars when display is resized in "normal size" mode (seems to fix bug #18)
close #46 #18
-rw-r--r-- | src/eom-scroll-view.c | 10 |
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 +} |