[haiku-appserver] weird R5 behaviour with regards to follow mode
- From: Stephan Assmus <superstippi@xxxxxx>
- To: haiku-appserver@xxxxxxxxxxxxx
- Date: Wed, 19 Apr 2006 15:04:41 +0200
Hi all,
the other day, I had a weird problem in one of my apps with regards to view
follow modes. I had a couple of views set to B_FOLLOW_NONE. Their parent
view was set to B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM. When the parent view was
moved because its parent view was resized, the B_FOLLOW_NONE children
actually stayed fixed with regards to window coordinates.
So I've written a small test app for the test environment that was supposed
to demonstrate the behaviour. It turned out however, that R5 behaves
inconsistently.
hierarchy:
View1 -> View2 (B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM) -> View3 (B_FOLLOW_NONE)
Indeed, if View2 is *moved* within its parent because the parent is
*resized*, View3 stay fixed (*moves* within View2 so that it stays fixed in
window space). However, if View2 is moved programmatically then View3 moves
along as if it had B_FOLLOW_LEFT | B_FOLLOW_TOP!!
In our app_server, B_FOLLOW_LEFT | B_FOLLOW_TOP is actually implicit.
Children views *always* move along with their parent. The follow modes are
only interesting with regards to parent views being resized. Since you
cannot resize a views left or top side (that's considered moving the view
plus resizing it), B_FOLLOW_LEFT and B_FOLLOW_TOP don't really have any
meaning. I think our logic is consistent (the coordinate system is simply
inherited).
I can not see the logic in what R5 is doing. If it worked in such a way
that B_FOLLOW_NONE makes sure a view stays fixed in window space regardless
of its parent, then it would make some sense. However, if the difference is
the *reason* for the parents movement, then I consider it a bug.
Any comments (should B_FOLLOW_NONE make sure a view stays fixed in window
space)?
Best regards,
-Stephan
- Follow-Ups:
- [haiku-appserver] Re: weird R5 behaviour with regards to follow mode
- From: Axel Dörfler
Other related posts:
- » [haiku-appserver] weird R5 behaviour with regards to follow mode
- » [haiku-appserver] Re: weird R5 behaviour with regards to follow mode
- » [haiku-appserver] Re: weird R5 behaviour with regards to follow mode
- » [haiku-appserver] Re: weird R5 behaviour with regards to follow mode
- [haiku-appserver] Re: weird R5 behaviour with regards to follow mode
- From: Axel Dörfler