diff options
author | bl0ckeduser <[email protected]> | 2014-05-03 12:04:57 -0400 |
---|---|---|
committer | bl0ckeduser <[email protected]> | 2014-05-03 12:04:57 -0400 |
commit | 7e732938f96c5ad3416ff23a06d7d6e9e83bca22 (patch) | |
tree | f6ccd9dc5790febba66920e2cc1ffecda3171d96 /src | |
parent | 37bba554f29007bf9d90c4183834dfe30daf3a56 (diff) | |
download | eom-7e732938f96c5ad3416ff23a06d7d6e9e83bca22.tar.bz2 eom-7e732938f96c5ad3416ff23a06d7d6e9e83bca22.tar.xz |
Update scrollbars when display is resized in "normal size" mode
Diffstat (limited to 'src')
-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 +} |