summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJennifer Liebel <jliebel94@gmail.com>2014-11-10 14:57:14 +0000
committerTobias Madl <tobias.madl.dev@gmail.com>2014-12-09 12:34:54 +0000
commit9824b78dd4ac44fe61d194854a4bc0e98015b4b2 (patch)
tree1f6ef6221f76c492a386e2bedb7b59fbe1978557 /sw
parent484129d08cc48595fe735f77bc3a30b5b8c3475a (diff)
changed timers to idle
Change-Id: I5846940cc45781f4a0264047107dbb568604d543
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/inc/swruler.hxx2
-rw-r--r--sw/source/uibase/misc/swruler.cxx10
2 files changed, 6 insertions, 6 deletions
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;
}