summaryrefslogtreecommitdiff
path: root/src/eom-scroll-view.c
diff options
context:
space:
mode:
authorSander Sweers <[email protected]>2014-05-05 23:52:54 +0200
committerSander Sweers <[email protected]>2014-05-05 23:52:54 +0200
commita9876d22c237632fa0fa028698c06903e55eb6e2 (patch)
treef6ccd9dc5790febba66920e2cc1ffecda3171d96 /src/eom-scroll-view.c
parent37bba554f29007bf9d90c4183834dfe30daf3a56 (diff)
parent7e732938f96c5ad3416ff23a06d7d6e9e83bca22 (diff)
downloadeom-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
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
+}