[haiku-commits] haiku: hrev51796 - docs/user/interface

  • From: jscipione@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 16 Feb 2018 19:26:40 -0500 (EST)

hrev51796 adds 1 changeset to branch 'master'
old head: a298f79ff9443a72b005e2a8aea246025950eaab
new head: f12d3b34778f5498ce8cfc7e42a623e370f83de9
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=f12d3b34778f+%5Ea298f79ff944

----------------------------------------------------------------------------

f12d3b34778f: Update BListItem::SetHeight() docs with selection box warning.
  
  The cached top coordinate of each BListItem isn't updated when you
  change the height of the item, leading to confusing highlighting and
  incorrect mouse clicks.  Rather than fixing it, this just documents a
  workaround or two to force an update of the cached coordinates.

                                 [ Alexander G. M. Smith <agmsmith@xxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev51796
Commit:      f12d3b34778f5498ce8cfc7e42a623e370f83de9
URL:         http://cgit.haiku-os.org/haiku/commit/?id=f12d3b34778f
Author:      Alexander G. M. Smith <agmsmith@xxxxxx>
Date:        Tue Nov  7 17:56:15 2017 UTC
Committer:   Skipp_OSX <jscipione@xxxxxxxxx>
Commit-Date: Sat Feb 17 00:26:34 2018 UTC

----------------------------------------------------------------------------

1 file changed, 10 insertions(+)
docs/user/interface/ListItem.dox | 10 ++++++++++

----------------------------------------------------------------------------

diff --git a/docs/user/interface/ListItem.dox b/docs/user/interface/ListItem.dox
index 23f280bf55..1b4b3b768f 100644
--- a/docs/user/interface/ListItem.dox
+++ b/docs/user/interface/ListItem.dox
@@ -172,6 +172,16 @@
 
        \param height The height to set the list item to.
 
+       \note Unlike BeOS, if you change the height then you need to force
+             the BListView to recalculate the cached tops of the item
+             selection boxes, otherwise selection highlights will be drawn
+             in the wrong places and mouse clicks will be misinterpreted.
+             You can do this by adding and removing a dummy BListItem at
+             the top of the list, or after hrev50780 by calling
+             BListView::FrameResized() with the current Frame rectangle
+             (though the FrameResized() method will additionally call
+             BListItem::Update() for all items).
+
        \since BeOS R3
 */
 


Other related posts: