From 9876ac3361c77a28a55e7843d6db1dc781f93d95 Mon Sep 17 00:00:00 2001 From: that Date: Sun, 15 Feb 2015 21:40:59 +0100 Subject: gui: support scrollable lists without headers If the
element doesn't exist, the header is not drawn. - minuitwrp: add function for clipping all drawing to a rectangle ...and another one to cancel it. Change-Id: If0f688a5debee6ebd9c457999fe571705a42c5cc --- gui/objects.hpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'gui/objects.hpp') diff --git a/gui/objects.hpp b/gui/objects.hpp index 537de208e..b6937a215 100644 --- a/gui/objects.hpp +++ b/gui/objects.hpp @@ -552,7 +552,7 @@ protected: // Handle scrolling changes for drags and kinetic scrolling void HandleScrolling(); - // Returns many rows the list is capable of displaying + // Returns many full rows the list is capable of displaying int GetDisplayItemCount(); // Returns the size in pixels of a partial item or row size @@ -569,7 +569,7 @@ protected: COLOR mHeaderFontColor; std::string mHeaderText; // Original header text without parsing any variables std::string mLastHeaderValue; // Header text after parsing variables - int mHeaderIsStatic; // indicates if the header is static (no need to check for changes in NotifyVarChange) + bool mHeaderIsStatic; // indicates if the header is static (no need to check for changes in NotifyVarChange) int mHeaderH; // actual header height including font, icon, padding, and separator heights ImageResource* mHeaderIcon; int mHeaderIconHeight, mHeaderIconWidth; // width and height of the header icon if present @@ -579,9 +579,8 @@ protected: // Per-item layout FontResource* mFont; COLOR mFontColor; - bool hasHighlightColor; // indicates if a hightlight color was set - bool hasFontHighlightColor; // indicates if the font hightlight color is set - COLOR mHighlightColor; // background row hightlight color + bool hasHighlightColor; // indicates if a highlight color was set + COLOR mHighlightColor; // background row highlight color COLOR mFontHighlightColor; int mFontHeight; int actualItemHeight; // Actual height of each item in pixels including max icon size, font size, and padding -- cgit v1.2.3