зеркало из https://github.com/mozilla/pjs.git
fixed live scrolling
This commit is contained in:
Родитель
f8e9e4e8e2
Коммит
f327e84e4d
|
@ -158,14 +158,25 @@ void nsScrollbar::DoScrollAction(ControlPartCode part)
|
||||||
}
|
}
|
||||||
EndDraw();
|
EndDraw();
|
||||||
|
|
||||||
|
// send event to scroll the parent
|
||||||
nsScrollbarEvent scrollBarEvent;
|
nsScrollbarEvent scrollBarEvent;
|
||||||
scrollBarEvent.eventStructType = NS_GUI_EVENT;
|
scrollBarEvent.eventStructType = NS_GUI_EVENT;
|
||||||
scrollBarEvent.widget = this;
|
scrollBarEvent.widget = this;
|
||||||
scrollBarEvent.message = scrollBarMessage;
|
scrollBarEvent.message = scrollBarMessage;
|
||||||
GetPosition(pos);
|
GetPosition(pos);
|
||||||
scrollBarEvent.position = pos;
|
scrollBarEvent.position = pos;
|
||||||
DispatchWindowEvent(scrollBarEvent);
|
Inherited::DispatchWindowEvent(scrollBarEvent);
|
||||||
GetParent()->Update();
|
|
||||||
|
// update the area of the parent uncovered by the scrolling
|
||||||
|
WindowRecord* savePort;
|
||||||
|
nsIWidget* parent = GetParent();
|
||||||
|
parent->Update();
|
||||||
|
NS_RELEASE(parent);
|
||||||
|
|
||||||
|
// update this scrollbar
|
||||||
|
this-Invalidate(PR_FALSE);
|
||||||
|
this->Update();
|
||||||
|
|
||||||
StartDraw();
|
StartDraw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -218,7 +229,9 @@ PRBool nsScrollbar::DispatchMouseEvent(nsMouseEvent &aEvent)
|
||||||
scrollBarEvent.message = NS_SCROLLBAR_POS;
|
scrollBarEvent.message = NS_SCROLLBAR_POS;
|
||||||
scrollBarEvent.position = mValue;
|
scrollBarEvent.position = mValue;
|
||||||
DispatchWindowEvent(scrollBarEvent);
|
DispatchWindowEvent(scrollBarEvent);
|
||||||
GetParent()->Update();
|
nsIWidget* parent = GetParent();
|
||||||
|
parent->Update();
|
||||||
|
NS_RELEASE(parent);
|
||||||
StartDraw();
|
StartDraw();
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
Загрузка…
Ссылка в новой задаче