Ticket #5678: scrollView.patch

File scrollView.patch, 895 bytes (added by yourpalal, 14 years ago)

a quick and dirty patch to fix this, and communicate the problem

  • src/kits/interface/ScrollView.cpp

     
    264264BSize
    265265BScrollView::MinSize()
    266266{
    267     BSize size = _ComputeSize(fTarget != NULL ? fTarget->MinSize()
    268         : BSize(16, 16));
    269 
     267    BSize size = BSize(0,0);
     268    if (fVerticalScrollBar) {
     269        BSize vBarSize = fVerticalScrollBar->MinSize();
     270        size.width += vBarSize.width;
     271        size.height += vBarSize.height;
     272    }
     273    if (fHorizontalScrollBar) {
     274        BSize hBarSize = fHorizontalScrollBar->MinSize();
     275        size.width += hBarSize.width;
     276        size.height += hBarSize.height;
     277    }
     278    if (fTarget) {
     279        BSize targetMin = fTarget->MinSize();
     280        size.width += targetMin.width;
     281        size.height += targetMin.height;
     282    }
     283       
    270284    return BLayoutUtils::ComposeSize(ExplicitMinSize(), size);
    271285}
    272286