diff options
author | Jan Holesovsky <kendy@suse.cz> | 2012-01-07 04:16:44 +0100 |
---|---|---|
committer | Petr Mladek <pmladek@suse.cz> | 2012-01-10 11:26:37 +0100 |
commit | a5f59c3802199f01dfbce70b01183d4d0166c2f2 (patch) | |
tree | 10cae00efab49a47129455a60bbd304b1fea0a76 /sw/source/ui/docvw/PageBreakWin.cxx | |
parent | d5143dba0fa2f6e47088a574cef1b6d626100841 (diff) |
Header/Footer, Page Breaks: Delay appearing by 500ms.
The delay was a good idea, just the 1s was too long.
Diffstat (limited to 'sw/source/ui/docvw/PageBreakWin.cxx')
-rw-r--r-- | sw/source/ui/docvw/PageBreakWin.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sw/source/ui/docvw/PageBreakWin.cxx b/sw/source/ui/docvw/PageBreakWin.cxx index 06171011fc04..0edeb618d576 100644 --- a/sw/source/ui/docvw/PageBreakWin.cxx +++ b/sw/source/ui/docvw/PageBreakWin.cxx @@ -110,6 +110,7 @@ SwPageBreakWin::SwPageBreakWin( SwEditWin* pEditWin, const SwPageFrm* pPageFrm ) m_pLine( NULL ), m_bIsAppearing( false ), m_nFadeRate( 100 ), + m_nDelayAppearing( 0 ), m_bDestroyed( false ), m_pMousePt( NULL ) { @@ -424,6 +425,9 @@ void SwPageBreakWin::SetReadonly( bool bReadonly ) void SwPageBreakWin::Fade( bool bFadeIn ) { m_bIsAppearing = bFadeIn; + if ( bFadeIn ) + m_nDelayAppearing = 0; + if ( !m_bDestroyed && m_aFadeTimer.IsActive( ) ) m_aFadeTimer.Stop(); if ( !m_bDestroyed ) @@ -439,6 +443,14 @@ IMPL_LINK( SwPageBreakWin, HideHandler, void *, EMPTYARG ) IMPL_LINK( SwPageBreakWin, FadeHandler, Timer *, EMPTYARG ) { + const int TICKS_BEFORE_WE_APPEAR = 10; + if ( m_bIsAppearing && m_nDelayAppearing < TICKS_BEFORE_WE_APPEAR ) + { + ++m_nDelayAppearing; + m_aFadeTimer.Start(); + return 0; + } + if ( m_bIsAppearing && m_nFadeRate > 0 ) m_nFadeRate -= 25; else if ( !m_bIsAppearing && m_nFadeRate < 100 ) |