From a999821ad46ac19fae34fec78d538423ff6e5adc Mon Sep 17 00:00:00 2001 From: that Date: Thu, 19 Feb 2015 22:51:24 +0100 Subject: gui: proportional scrollbars - Attribute "recth" in the element is now the *minimum* height for the scrollbar. - Dragging the scrollbar moves the list. - Touching outside the scrollbar jumps to the relative position. Change-Id: Ic1f20b5ec68cf49e5be56be34f0c58c0f474618b --- gui/objects.hpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'gui/objects.hpp') diff --git a/gui/objects.hpp b/gui/objects.hpp index ceb2c6c0c..00770b378 100644 --- a/gui/objects.hpp +++ b/gui/objects.hpp @@ -589,13 +589,18 @@ protected: int mSeparatorH; // Height of the separator between items COLOR mSeparatorColor; // color of the separator that is between items - // Scrolling and dynamic state + // Scrollbar int mFastScrollW; // width of the fastscroll area int mFastScrollLineW; // width of the line for fastscroll rendering int mFastScrollRectW; // width of the rectangle for fastscroll - int mFastScrollRectH; // height of the rectangle for fastscroll + int mFastScrollRectH; // minimum height of the rectangle for fastscroll COLOR mFastScrollLineColor; COLOR mFastScrollRectColor; + + // Scrolling and dynamic state + int mFastScrollRectCurrentY; // current top of fastscroll rect relative to list top + int mFastScrollRectCurrentH; // current height of fastscroll rect + int mFastScrollRectTouchY; // offset from top of fastscroll rect where the user initially touched bool hasScroll; // indicates that we have enough items in the list to scroll int firstDisplayedItem; // this item goes at the top of the display list - may only be partially visible int scrollingSpeed; // on a touch release, this is set based on the difference in the y-axis between the last 2 touches and indicates how fast the kinetic scrolling will go -- cgit v1.2.3