aboutsummaryrefslogtreecommitdiff
path: root/fiv-view.c
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2023-12-28 11:19:04 +0100
committerPřemysl Eric Janouch <p@janouch.name>2023-12-28 11:22:17 +0100
commitee08565389f0e0f3a5861887d0a0322b59213f98 (patch)
tree525a2ce423dfa8c635c2d8f880be0f2e51c981fd /fiv-view.c
parentc04c4063e4a4feabf0eb23b3a38630e4fce1456b (diff)
downloadfiv-ee08565389f0e0f3a5861887d0a0322b59213f98.tar.gz
fiv-ee08565389f0e0f3a5861887d0a0322b59213f98.tar.xz
fiv-ee08565389f0e0f3a5861887d0a0322b59213f98.zip
Resolve spurious overshoot indicators
_gtk_scrolled_window_get_overshoot() decrements the page size from the upper value before using it for comparisons.
Diffstat (limited to 'fiv-view.c')
-rw-r--r--fiv-view.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fiv-view.c b/fiv-view.c
index b05e30b..d3e634a 100644
--- a/fiv-view.c
+++ b/fiv-view.c
@@ -198,12 +198,14 @@ update_adjustments(FivView *self)
if (self->hadjustment) {
gtk_adjustment_configure(self->hadjustment,
- gtk_adjustment_get_value(self->hadjustment), 0, dw,
+ gtk_adjustment_get_value(self->hadjustment),
+ 0, MAX(dw, alloc.width),
alloc.width * 0.1, alloc.width * 0.9, alloc.width);
}
if (self->vadjustment) {
gtk_adjustment_configure(self->vadjustment,
- gtk_adjustment_get_value(self->vadjustment), 0, dh,
+ gtk_adjustment_get_value(self->vadjustment),
+ 0, MAX(dh, alloc.height),
alloc.height * 0.1, alloc.height * 0.9, alloc.height);
}
}