From 9824b78dd4ac44fe61d194854a4bc0e98015b4b2 Mon Sep 17 00:00:00 2001 From: Jennifer Liebel Date: Mon, 10 Nov 2014 14:57:14 +0000 Subject: changed timers to idle Change-Id: I5846940cc45781f4a0264047107dbb568604d543 --- sw/source/uibase/inc/swruler.hxx | 2 +- sw/source/uibase/misc/swruler.cxx | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'sw') diff --git a/sw/source/uibase/inc/swruler.hxx b/sw/source/uibase/inc/swruler.hxx index 015815c1c52f..19b877f8253f 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) - Idle maFadeIdle; //< Timer for high/'low'light fading + Timer maFadeTimer; //< 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 8b374b904457..172a0b39c483 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 - maFadeIdle.SetPriority(VCL_IDLE_PRIORITY_RESIZE); - maFadeIdle.SetIdleHdl( LINK( this, SwCommentRuler, FadeHandler ) ); + maFadeTimer.SetTimeout(40); + maFadeTimer.SetTimeoutHdl( LINK( this, SwCommentRuler, FadeHandler ) ); } // Destructor @@ -203,7 +203,7 @@ void SwCommentRuler::MouseMove(const MouseEvent& rMEvt) SetQuickHelpText( OUString() ); } // Do start fading - maFadeIdle.Start(); + maFadeTimer.Start(); } } @@ -274,7 +274,7 @@ Rectangle SwCommentRuler::GetCommentControlRegion() Color SwCommentRuler::GetFadedColor(const Color &rHighColor, const Color &rLowColor) { - if ( ! maFadeIdle.IsActive() ) + if ( ! maFadeTimer.IsActive() ) return mbIsHighlighted ? rHighColor : rLowColor; Color aColor = rHighColor; @@ -295,7 +295,7 @@ IMPL_LINK_NOARG(SwCommentRuler, FadeHandler) Invalidate(); if ( mnFadeRate != 0 && mnFadeRate != 100) - maFadeIdle.Start(); + maFadeTimer.Start(); return 0; } -- cgit