Re: bug in gtk_adjustment_clamp_page()?
- Date: Thu, 26 Nov 2015 18:31:00 +0100
- From: Florian Müllner <fmuellner@xxxxxxxxx>
- Subject: Re: bug in gtk_adjustment_clamp_page()?
On Thu, Nov 26, 2015 at 4:24 PM, <jcupitt@xxxxxxxxx> wrote:
> These lines:
> Clamp the value of an adjustment so it lies between lower and upper.
No. From the documentation a couple of lines above:
"Updates the #GtkAdjustment:value property to ensure that the range
between @lower and @upper is in the current page (i.e. between
#GtkAdjustment:value and #GtkAdjustment:value + #GtkAdjustment:page-size)."
In other words:
:value <= @lower <= @upper <= :value + :page-size
(if @upper - @lower <= :page-size, otherwise @lower "wins")
So the comparison operators are correct for the documented behavior.
gtk-devel-list mailing list