mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50:42 -05:00
cookbook: Added more explanation about setting y coord on scrollable
Added some extra explanation, referencing the sample code, to try to make the scrollable actor example easier to follow. Basically demonstrates the principles described in the paragraph about setting the y coordinate for the scrollable actor, but using actual numbers.
This commit is contained in:
parent
a74d585fc5
commit
8db96675d4
@ -635,6 +635,17 @@ _scroll_event_cb (ClutterActor *viewport,
|
|||||||
|
|
||||||
<para>Scrolling down adds to the <code>y</code> coordinate
|
<para>Scrolling down adds to the <code>y</code> coordinate
|
||||||
(but only up to a maximum value of <code>0.0</code>).</para>
|
(but only up to a maximum value of <code>0.0</code>).</para>
|
||||||
|
|
||||||
|
<para>To see how this works in practice, look at
|
||||||
|
<link linkend="events-mouse-scroll-example">the code
|
||||||
|
sample</link>. There, the height of the scrollable actor is
|
||||||
|
set to <code>300</code> and the height of the viewport to
|
||||||
|
<code>150</code>. This means that the <code>y</code>
|
||||||
|
coordinate value for the scrollable actor will vary between
|
||||||
|
<code>-150.0</code> (<code>150 - 300</code>), making
|
||||||
|
its base visible and clipping the top; and
|
||||||
|
<code>0.0</code>, where its top is visible and its base
|
||||||
|
clipped.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
|
Loading…
Reference in New Issue
Block a user