diff options
author | Jennifer Liebel <jliebel94@gmail.com> | 2014-11-05 12:21:07 +0000 |
---|---|---|
committer | Tobias Madl <tobias.madl.dev@gmail.com> | 2014-12-09 12:34:50 +0000 |
commit | 93f5b9be9f4c01ac0d863a193f4ef33dfd194af0 (patch) | |
tree | 86908f34b46a5f7dd21ee5bfae5d0839eb839bd9 | |
parent | 3581188901d04baed3624473bd180b6c8b4a4358 (diff) |
changed timer to idle
Change-Id: I321ddf0411bf66ffce648f6d27e1669194bf80db
-rw-r--r-- | svtools/source/control/tabbar.cxx | 4 | ||||
-rw-r--r-- | sw/source/uibase/inc/swruler.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/misc/swruler.cxx | 10 |
3 files changed, 8 insertions, 8 deletions
diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 36d8ce0105bc..15df257b92b8 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -324,7 +324,7 @@ IMPL_LINK( TabBarEdit, ImplEndEditHdl, void*, pCancel ) ResetPostEvent(); maLoseFocusTimer.Stop(); - // We need this query, because the edit get a losefous event, + // We need this query, because the edit gets a losefocus event, // when it shows the context menu or the insert symbol dialog if ( !HasFocus() && HasChildPathFocus( true ) ) { @@ -345,7 +345,7 @@ IMPL_LINK_NOARG(TabBarEdit, ImplEndTimerHdl) if ( HasFocus() ) return 0; - // We need this query, because the edit get a losefous event, + // We need this query, because the edit gets a losefocus event, // when it shows the context menu or the insert symbol dialog if ( HasChildPathFocus( true ) ) maLoseFocusTimer.Start(); diff --git a/sw/source/uibase/inc/swruler.hxx b/sw/source/uibase/inc/swruler.hxx index 19b877f8253f..015815c1c52f 100644 --- a/sw/source/uibase/inc/swruler.hxx +++ b/sw/source/uibase/inc/swruler.hxx @@ -45,7 +45,7 @@ protected: SwViewShell * mpViewShell; //< Shell to check if there is any comments on doc and their visibility SwEditWin * mpSwWin; //< Used to get SwView to change the SideBar visibility bool mbIsHighlighted; //< If comment control is highlighted (mouse is over it) - Timer maFadeTimer; //< Timer for high/'low'light fading + Idle maFadeIdle; //< Timer for high/'low'light fading int mnFadeRate; //< From 0 to 100. 0 means not highlighted. VirtualDevice maVirDev; //< VirtualDevice of this window. Just for convenience. diff --git a/sw/source/uibase/misc/swruler.cxx b/sw/source/uibase/misc/swruler.cxx index 172a0b39c483..8b374b904457 100644 --- a/sw/source/uibase/misc/swruler.cxx +++ b/sw/source/uibase/misc/swruler.cxx @@ -44,8 +44,8 @@ SwCommentRuler::SwCommentRuler( SwViewShell* pViewSh, vcl::Window* pParent, SwEd , maVirDev( *this ) { // Set fading timeout: 5 x 40ms = 200ms - maFadeTimer.SetTimeout(40); - maFadeTimer.SetTimeoutHdl( LINK( this, SwCommentRuler, FadeHandler ) ); + maFadeIdle.SetPriority(VCL_IDLE_PRIORITY_RESIZE); + maFadeIdle.SetIdleHdl( LINK( this, SwCommentRuler, FadeHandler ) ); } // Destructor @@ -203,7 +203,7 @@ void SwCommentRuler::MouseMove(const MouseEvent& rMEvt) SetQuickHelpText( OUString() ); } // Do start fading - maFadeTimer.Start(); + maFadeIdle.Start(); } } @@ -274,7 +274,7 @@ Rectangle SwCommentRuler::GetCommentControlRegion() Color SwCommentRuler::GetFadedColor(const Color &rHighColor, const Color &rLowColor) { - if ( ! maFadeTimer.IsActive() ) + if ( ! maFadeIdle.IsActive() ) return mbIsHighlighted ? rHighColor : rLowColor; Color aColor = rHighColor; @@ -295,7 +295,7 @@ IMPL_LINK_NOARG(SwCommentRuler, FadeHandler) Invalidate(); if ( mnFadeRate != 0 && mnFadeRate != 100) - maFadeTimer.Start(); + maFadeIdle.Start(); return 0; } |