The relationship between adjustments and scrollbars and
scrollable widgets was much more complex than it needed to be.
StScrollView: Have the scroll view own a pair of adjustments,
set them on the child on add(), remove unnecessary
change notification signal connections.
StBoxLayout: Remove auto-create of adjustments, just take the
adjustments from the scrollbars and set them on the scrollable
child. Notify for hadjustment/vadjustment properties.
StScrollBar: Notify adjustment property.
StScrollable: Document how adjustment setting works.
https://bugzilla.gnome.org/show_bug.cgi?id=611740
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
StScrollable: Document how size negotation now works between the
parent and scrollable child.
StBoxLayout: Adapt to the new contract for how size negotiation
works; in particular, handle being allocated less than the
minimum size when scrolled and treat the minimum size as the
size of the scrolled area in instead of the natural size.
StScrollView: Substantially rewrite with fixes including:
- Implement new size negotation contract; this allows us
to determine scrollbar visibility without having to
connect to the adjustment.
- Implement all ALWAYS along with the existing NEVER/AUTO
- When hiding and showing scrollbars and shadows, don't
hide and show widgets, just turn on and off including them
in pick and paint. This avoids queueing relayouts.
- Cleanups for the code for connecting to adjustments,
for changing policy, and for turning on and off shadows.
scroll-view-sizing.js: New test case for StScrollView, allowing
resizing the scroll view interactively, changing the scrollbar
policies and turning shadows on and off.
https://bugzilla.gnome.org/show_bug.cgi?id=611740
To each .c and .h file, add:
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
'gnu' is the default anyways for Emacs, but indent-tabs-mode is not,
so this sets things up to correspond to the policy of no-tabs.
http://bugzilla.moblin.org/show_bug.cgi?id=6467
Add GObject Introspection annotations to methods where needed, in
particular adding (transfer none) to return values that don't transfer
ownership.
st_texture_cache_get_actor() and st_texture_cache_get_texture()
are annotated as (transfer none) since they return a newly
created *floating* texture.
https://bugzilla.gnome.org/show_bug.cgi?id=591245