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:
Owen W. Taylor
2010-03-10 13:57:05 -05:00
parent f6cbb14393
commit c83883f1f7
3 changed files with 16 additions and 8 deletions

View File

@ -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
{