[haiku-development] Re: BScrollView and layouts

  • From: "Adrien Destugues" <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 18 Jan 2017 11:41:07 +0000

I found the place I had missed where it was still being added to the window’s 
layout, so the group
view now is properly added as the scrollview target. However now the 
scrollbar thinks the view is
way larger than it actually is and shows a tiny draggable bar when in fact 
the entire view is
shown. And moving the draggable bar makes the view draw outside what should 
be the frame of the
scroll view and covers over the small “Notification Center” header view at 
the top. So I will have
to work on that.

Maybe you need to use SetExplicitMinSize / SetExplicitMaxSize to constrain the 
size of the view.


This also allows you to control the scrolling more precisely, as the
default behavior (scroll by 1 pixel at a time) isn't particularly useful
anyway.

Hmm can you explain, I am not sure what you mean.

The default behavior of the scrollbars is to scroll by pixel units. So, a click 
on the down arrow (or a mousewheel move) will only scroll by 1 pixel. This is 
much too slow, usually what is wanted is scrollbing by about 1 line of text 
instead. You need to tweak the scrollbar range and deltas to make this work as 
expected, overriding the defaults that BScrollView usually sets for you (which 
are often not the best choices)

-- 
Adrien.

Other related posts: