Always position headers at a negative position
Previously headers were either positioned at 0 if there were no items in
the view, or at (0 - headerSize) if items were present. With this fix
they are always positioned at (0 - headerSize) to be consistent.
Due to the change, setPosition(-headerSize()) is now called from
componentCompleted() to ensure the header is visible.
This change also fixes GridView's header and footer positioning in
TopToBottom + RightToLeft mode.
Also added extra tests for header and footer positioning and fixed
incorrect test value in tst_QSGGridView::positionViewAtIndex() (was 460
instead of 430 because previously rowPosAt() always added the header
size, so if positionViewAtIndex() jumped past all visible items and
caused them to be released, the new items started at +headerSize()
instead of 0).
Change-Id: I1015bed457d4ae964a7fb13702e2dfc470a168a9
Reviewed-on: http://codereview.qt.nokia.com/1618
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>