[haiku-commits] Re: haiku: hrev52795 - src/kits/media src/kits/interface docs/user/interface src/apps/people

  • From: Kacper Kasper <kacperkasper@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 27 Jan 2019 19:17:10 +0100

Applications or views that need custom scrolling behavior almost
certainly will be using BScrollBars directly and not this

Why do you think so? BScrollView does a lot of stuff besides managing
scroll bars (borders come to mind).

so this should not be "wasted computation" in pretty much any case.

It's not a matter of wasted computation. I've tried fixing
BScintillaView after this change [1] and one thing I can't fix is that
this recalc resets the value of scrollbars.
Example:
I have a vertical scrollbar with knob in the middle. When window is
resized range is changed and it doesn't matter that I immediately fix
it - value is now lost, view scrolled back to the beginning.

This should be hidden behind a flag. I don't mind it being default
behavior, but disabling it should be possible. (B_SUPPORTS_LAYOUT
check is not enough.) I don't want to waste a few hours trying to come
up with a hack that circumvents this.

- Kacper

[1] 
https://sourceforge.net/p/scintilla/haiku/ci/10f977e61c598067f68cc90964232a21206a761f/

Other related posts: