[haiku-commits] Re: haiku: hrev45965 - in src/apps/haiku-depot/textview: . src/apps/haiku-depot

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 16 Aug 2013 08:30:56 +0200

On 08/15/2013 10:13 PM, Stephan Aßmus wrote:
On 15.08.2013 14:06, Ingo Weinhold wrote:
I guess the cleanest solution to deal with the interface kit's weird
scrolling design would be to introduce a BViewPort class. One would add
such a view to the BScrollView and the view that should be scrolled
would be a child of it. The child would simply have its correct (full)
size and would be unaware of being scrolled at all.

Basically, that is exactly what happens. The BGroupView I use as the
container is that view port.

Yes, but it is still laid out with the wrong size (you have to compute the correct size yourself) and it has to do the scrollbar management itself. That's the things the BViewPort would encapsulate.

(*) Using MinSize() works for non-haiku-for-width views just because
                                   ^^^^^ :-)

8-O

Thanks for confirming and clearing things up! I think the requirement to
return the minimum size of *both* dimensions in MinSize() for
GetHeightForWidth() views should be documented perhaps right above
GetHeightForWidth() in View.h. What do you think?

I think a place in the documentation (ideally also a section for the height-for-width feature) would be better.

CU, Ingo


Other related posts: