Resolve spurious overshoot indicators
_gtk_scrolled_window_get_overshoot() decrements the page size from the upper value before using it for comparisons.
This commit is contained in:
parent
c04c4063e4
commit
ee08565389
|
@ -275,14 +275,13 @@ relayout(FivBrowser *self, int width)
|
||||||
gtk_adjustment_set_page_size(self->hadjustment, width);
|
gtk_adjustment_set_page_size(self->hadjustment, width);
|
||||||
}
|
}
|
||||||
if (self->vadjustment) {
|
if (self->vadjustment) {
|
||||||
|
int height = gtk_widget_get_allocated_height(widget);
|
||||||
gtk_adjustment_set_lower(self->vadjustment, 0);
|
gtk_adjustment_set_lower(self->vadjustment, 0);
|
||||||
gtk_adjustment_set_upper(self->vadjustment, total_height);
|
gtk_adjustment_set_upper(self->vadjustment, MAX(height, total_height));
|
||||||
gtk_adjustment_set_step_increment(self->vadjustment,
|
gtk_adjustment_set_step_increment(self->vadjustment,
|
||||||
self->item_height + self->item_spacing + 2 * self->item_border_y);
|
self->item_height + self->item_spacing + 2 * self->item_border_y);
|
||||||
gtk_adjustment_set_page_increment(
|
gtk_adjustment_set_page_increment(self->vadjustment, height * 0.9);
|
||||||
self->vadjustment, gtk_widget_get_allocated_height(widget) * 0.9);
|
gtk_adjustment_set_page_size(self->vadjustment, height);
|
||||||
gtk_adjustment_set_page_size(
|
|
||||||
self->vadjustment, gtk_widget_get_allocated_height(widget));
|
|
||||||
}
|
}
|
||||||
return total_height;
|
return total_height;
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,12 +198,14 @@ update_adjustments(FivView *self)
|
||||||
|
|
||||||
if (self->hadjustment) {
|
if (self->hadjustment) {
|
||||||
gtk_adjustment_configure(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);
|
alloc.width * 0.1, alloc.width * 0.9, alloc.width);
|
||||||
}
|
}
|
||||||
if (self->vadjustment) {
|
if (self->vadjustment) {
|
||||||
gtk_adjustment_configure(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);
|
alloc.height * 0.1, alloc.height * 0.9, alloc.height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue