summaryrefslogtreecommitdiff
path: root/src/eom-scroll-view.c
diff options
context:
space:
mode:
authorbl0ckeduser <[email protected]>2014-05-03 12:04:57 -0400
committerinfirit <[email protected]>2014-07-11 14:29:55 +0200
commit37800a73e939faaa49d840e03c1983ecaa39a8f7 (patch)
tree7414942b5db5d4495b94bb533ac7940949eafe61 /src/eom-scroll-view.c
parent58b5b330732ddeeafd2acca99af6d70fcb7ea760 (diff)
downloadeom-37800a73e939faaa49d840e03c1983ecaa39a8f7.tar.bz2
eom-37800a73e939faaa49d840e03c1983ecaa39a8f7.tar.xz
Update scrollbars when display is resized in "normal size" mode
Diffstat (limited to 'src/eom-scroll-view.c')
-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
+}