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

  • From: "Alexander G. M. Smith" <agmsmith@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 17 Feb 2018 08:54:58 -0500 EST

looncraz <looncraz@xxxxxxxxxxxx> wrote on Fri, 16 Feb 2018 21:53:00 -0600:

Why not just address the bug?  Because it definitely seems to be a bug 
if height changes of an item aren't being used to refresh the list... 
and one that should be easily patched.

The API doesn't support notification back to the system of height changes,
since the old BeOS system would recalculate everything when drawing.  The
new system has cached the positions of each item's top, but there's no
automatic way of invalidating the cached values.

The obvious way would be to make SetHeight() virtual and have the base
class do the cache invalidation.  But that would break compatibility.
Maybe have a second SetHeight() with a different arguments or a different
name that does the invalidation?  Or break the API in R2 by changing
SetHeight() to be virtual and require a recompile.  For now, I think a
documentation warning is good enough (most uses only set the height once,
though I needed to change it at run time for font size changes)

- Alex

Other related posts: