Fixes for setting up scrolling adjustments
StScrollable: Document how to set adjustments StBoxLayout: Make sure that we always have upper >= lower + page_size, so that clamping works properly. Set the page_increment to be slightly less than the page_size so there is some overlap, as is customary. StScrollView: Remove unnecessary fabs() calls, rewrite expressions for additional clarity. https://bugzilla.gnome.org/show_bug.cgi?id=611740
This commit is contained in:
@ -171,8 +171,8 @@ update_shadow_visibility (StScrollView *scroll)
|
||||
|
||||
st_adjustment_get_values (priv->vadjustment, &value, &lower, &upper, NULL, NULL, &page_size);
|
||||
|
||||
priv->top_shadow_visible = fabs (value - lower) > 0.1;
|
||||
priv->bottom_shadow_visible = fabs (upper - value - page_size) > 0.1;
|
||||
priv->top_shadow_visible = value > lower + 0.1;
|
||||
priv->bottom_shadow_visible = value < upper - page_size - 0.1;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user