diff options
author | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2012-01-20 15:40:02 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2012-01-20 15:40:02 +0100 |
commit | 0c8c85ec6ec3a19f86df844b59b2f540d8972186 (patch) | |
tree | 64dafa8987db7b548155cebd19be523bab9b67d4 | |
parent | a61ea02511d6e81035495fefaa24e77b30701362 (diff) |
Revert "Page Breaks: IsLeaveWindow() is unreliable, we do not need it here."
This reverts commit 1e0de54d88a79c99f0671f608f7de096cb721537. This
commit introduces the button flickering behavior.
-rw-r--r-- | sw/source/ui/docvw/PageBreakWin.cxx | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx index ff5050b3f826..0edeb618d576 100644 --- a/sw/source/ui/docvw/PageBreakWin.cxx +++ b/sw/source/ui/docvw/PageBreakWin.cxx @@ -83,11 +83,17 @@ namespace void SwBreakDashedLine::MouseMove( const MouseEvent& rMEvt ) { - Point aEventPos( GetPosPixel() + rMEvt.GetPosPixel() ); - if ( !m_pWin->Contains( aEventPos ) ) - m_pWin->Fade( false ); + if ( rMEvt.IsLeaveWindow() ) + { + // don't fade if we just move to the 'button' + Point aEventPos( GetPosPixel() + rMEvt.GetPosPixel() ); + if ( !m_pWin->Contains( aEventPos ) ) + m_pWin->Fade( false ); + } else if ( !m_pWin->IsVisible() ) + { m_pWin->Fade( true ); + } if ( !rMEvt.IsSynthetic() ) { @@ -303,9 +309,13 @@ void SwPageBreakWin::Select( ) void SwPageBreakWin::MouseMove( const MouseEvent& rMEvt ) { - Point aEventPos( rMEvt.GetPosPixel() + rMEvt.GetPosPixel() ); - if ( !Contains( aEventPos ) && !PopupMenu::IsInExecute() ) - Fade( false ); + if ( rMEvt.IsLeaveWindow() ) + { + // don't fade if we just move to the 'line', or the popup menu is open + Point aEventPos( rMEvt.GetPosPixel() + rMEvt.GetPosPixel() ); + if ( !Contains( aEventPos ) && !PopupMenu::IsInExecute() ) + Fade( false ); + } else if ( !IsVisible() ) Fade( true ); } |