Rewrote the push/pop state and ViewAttr stuff:
- it now seems to work finally correctly - renamed ViewAttr to ViewState and put it into the BPrivate namespace - some refactoring (moved some private BView methods to ViewState) - renamed AS_LAYER_MOVETO/RESIZETO to *_TO (note the underscore) - exchanged BView::originX/Y with fParentOffset (BPoint) - divided AS_LAYER_GET_COLORS into separate ones for high/low/view color - BView::SetPattern() now actually works as expected (ie. updates only if necessary) - exchanged the ViewAttr::flags with ViewState::valid_flags which inverses the previous logic (which wasn't even used consistently) - fState was initialized twice (incorrectly by the ViewAttr constructor, and then again correctly by initCachedState()) - now the ViewState constructor does the job alone, but correctly - BView::PushState() no longer resets the state (it did so only locally anyway...) - cleanup git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13325 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -833,10 +833,10 @@ BWindow::DispatchMessage(BMessage *msg, BHandler *target)
|
||||
msg->FindFloat("height", i, &height);
|
||||
if ((view = findView(top_view, token))) {
|
||||
// update the views offset in parent
|
||||
if (view->originX != frameLeftTop.x || view->originY != frameLeftTop.y) {
|
||||
if (view->LeftTop() != frameLeftTop) {
|
||||
//printf("updating position (%.1f, %.1f): %s\n", frameLeftTop.x, frameLeftTop.y, view->Name());
|
||||
view->originX = frameLeftTop.x;
|
||||
view->originY = frameLeftTop.y;
|
||||
view->fParentOffset = frameLeftTop;
|
||||
|
||||
// optionally call FrameMoved
|
||||
if (view->fFlags & B_FRAME_EVENTS) {
|
||||
STRACE(("Calling BView(%s)::FrameMoved( %.1f, %.1f )\n", view->Name(),
|
||||
|
||||
Reference in New Issue
Block a user