[haiku-development] Re: Can we make BStringView's MaxSize = BSize(B_SIZE_UNLIMITED, B_SIZE_UNSET) by default?

  • From: Alex Wilson <yourpalal2@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 10 Apr 2012 18:10:03 -0600

On Tue, Apr 10, 2012 at 1:57 PM, John Scipione <jscipione@xxxxxxxxx> wrote:
>
> On Tue, Apr 10, 2012 at 3:04 PM, Alex Wilson <yourpalal2@xxxxxxxxx> wrote:
> > Okay, cool, then we should still support these methods to some extent, but
> > we don't need to worry too much about them. What I'm thinking is to override
> > LayoutAlignment() like so:
> >
> > BAlignment
> > BStringView::LayoutAlignment()
> > {
> >      return LayoutUtils::ComposeAlignment(ExplicitAlignment(),
> > BAlignment(fAlign, B_ALIGN_MIDDLE));
> > }
>
> I assume that you would override the BView's LayoutAlignment() method
> in BStringView. This sounds good to me provided that fAlign is
> B_ALIGN_LEFT initially, which, what do you know, I just looked and it
> is.
>

bingo

>
> Since you seem to have a good grasp of this, could you code up your
> solution and commit the result? Once that is done I'll update my code
> to take out the calls to SetExplicitMaxSize().

I can do it, but I can't guarantee that I'll be quick about it. If I'm
holding you back feel free to beat me to it.

--Alex

Other related posts: