Added code for erasing the small square between scrollbars.
Corrected window size if scrollbars is removed/added.
Reduce flicker in scrollbars.
Prevent scrollbars from jumping back to original position
if the mouse just barely left the scrollbar.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -4145,6 +4145,8 @@ bool wxWin32ScrollBarInputHandler::HandleMouseMove(wxInputConsumer *control,
|
||||
// if we're scrolling the scrollbar because the arrow or the shaft was
|
||||
// pressed, check that the mouse stays on the same scrollbar element
|
||||
|
||||
#if 0
|
||||
// Always let thumb jump back if we leave the scrollbar
|
||||
if ( event.Moving() )
|
||||
{
|
||||
ht = m_renderer->HitTestScrollbar(scrollbar, event.GetPosition());
|
||||
@@ -4153,6 +4155,21 @@ bool wxWin32ScrollBarInputHandler::HandleMouseMove(wxInputConsumer *control,
|
||||
{
|
||||
ht = wxHT_NOWHERE;
|
||||
}
|
||||
#else
|
||||
// Jump back only if we get far away from it
|
||||
wxPoint pos = event.GetPosition();
|
||||
if (scrollbar->HasFlag( wxVERTICAL ))
|
||||
{
|
||||
if (pos.x > -20 && pos.x < scrollbar->GetSize().x+20)
|
||||
pos.x = 5;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pos.y > -20 && pos.y < scrollbar->GetSize().y+20)
|
||||
pos.y = 5;
|
||||
}
|
||||
ht = m_renderer->HitTestScrollbar(scrollbar, pos );
|
||||
#endif
|
||||
|
||||
// if we're dragging the thumb and the mouse stays in the scrollbar, it
|
||||
// is still ok - we only want to catch the case when the mouse leaves
|
||||
|
||||
Reference in New Issue
Block a user