diff options
author | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2012-01-20 16:20:55 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2012-01-26 16:07:53 +0100 |
commit | 5fd72b4dc0191610e4d7b9cc30c5ec5b345150cb (patch) | |
tree | da8f5a77e54e03bef6bf7c0e49e106cb09b5d07f /sw | |
parent | edf0a7e36754f485aa787769f3a82ac92f548f7f (diff) |
Revert "Page Breaks: IsLeaveWindow() is unreliable, we do not need it here."
This reverts commit 60c968e9a2ef14aa289e677bd7f40d2c4724fd12. This
introduced flickering page break button
Diffstat (limited to 'sw')
-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 ); } |