Kaydet (Commit) 93f5b9be authored tarafından Jennifer Liebel's avatar Jennifer Liebel Kaydeden (comit) Tobias Madl

changed timer to idle

Change-Id: I321ddf0411bf66ffce648f6d27e1669194bf80db
üst 35811889
...@@ -324,7 +324,7 @@ IMPL_LINK( TabBarEdit, ImplEndEditHdl, void*, pCancel ) ...@@ -324,7 +324,7 @@ IMPL_LINK( TabBarEdit, ImplEndEditHdl, void*, pCancel )
ResetPostEvent(); ResetPostEvent();
maLoseFocusTimer.Stop(); 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 // when it shows the context menu or the insert symbol dialog
if ( !HasFocus() && HasChildPathFocus( true ) ) if ( !HasFocus() && HasChildPathFocus( true ) )
{ {
...@@ -345,7 +345,7 @@ IMPL_LINK_NOARG(TabBarEdit, ImplEndTimerHdl) ...@@ -345,7 +345,7 @@ IMPL_LINK_NOARG(TabBarEdit, ImplEndTimerHdl)
if ( HasFocus() ) if ( HasFocus() )
return 0; 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 // when it shows the context menu or the insert symbol dialog
if ( HasChildPathFocus( true ) ) if ( HasChildPathFocus( true ) )
maLoseFocusTimer.Start(); maLoseFocusTimer.Start();
......
...@@ -45,7 +45,7 @@ protected: ...@@ -45,7 +45,7 @@ protected:
SwViewShell * mpViewShell; //< Shell to check if there is any comments on doc and their visibility 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 SwEditWin * mpSwWin; //< Used to get SwView to change the SideBar visibility
bool mbIsHighlighted; //< If comment control is highlighted (mouse is over it) 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. int mnFadeRate; //< From 0 to 100. 0 means not highlighted.
VirtualDevice maVirDev; //< VirtualDevice of this window. Just for convenience. VirtualDevice maVirDev; //< VirtualDevice of this window. Just for convenience.
......
...@@ -44,8 +44,8 @@ SwCommentRuler::SwCommentRuler( SwViewShell* pViewSh, vcl::Window* pParent, SwEd ...@@ -44,8 +44,8 @@ SwCommentRuler::SwCommentRuler( SwViewShell* pViewSh, vcl::Window* pParent, SwEd
, maVirDev( *this ) , maVirDev( *this )
{ {
// Set fading timeout: 5 x 40ms = 200ms // Set fading timeout: 5 x 40ms = 200ms
maFadeTimer.SetTimeout(40); maFadeIdle.SetPriority(VCL_IDLE_PRIORITY_RESIZE);
maFadeTimer.SetTimeoutHdl( LINK( this, SwCommentRuler, FadeHandler ) ); maFadeIdle.SetIdleHdl( LINK( this, SwCommentRuler, FadeHandler ) );
} }
// Destructor // Destructor
...@@ -203,7 +203,7 @@ void SwCommentRuler::MouseMove(const MouseEvent& rMEvt) ...@@ -203,7 +203,7 @@ void SwCommentRuler::MouseMove(const MouseEvent& rMEvt)
SetQuickHelpText( OUString() ); SetQuickHelpText( OUString() );
} }
// Do start fading // Do start fading
maFadeTimer.Start(); maFadeIdle.Start();
} }
} }
...@@ -274,7 +274,7 @@ Rectangle SwCommentRuler::GetCommentControlRegion() ...@@ -274,7 +274,7 @@ Rectangle SwCommentRuler::GetCommentControlRegion()
Color SwCommentRuler::GetFadedColor(const Color &rHighColor, const Color &rLowColor) Color SwCommentRuler::GetFadedColor(const Color &rHighColor, const Color &rLowColor)
{ {
if ( ! maFadeTimer.IsActive() ) if ( ! maFadeIdle.IsActive() )
return mbIsHighlighted ? rHighColor : rLowColor; return mbIsHighlighted ? rHighColor : rLowColor;
Color aColor = rHighColor; Color aColor = rHighColor;
...@@ -295,7 +295,7 @@ IMPL_LINK_NOARG(SwCommentRuler, FadeHandler) ...@@ -295,7 +295,7 @@ IMPL_LINK_NOARG(SwCommentRuler, FadeHandler)
Invalidate(); Invalidate();
if ( mnFadeRate != 0 && mnFadeRate != 100) if ( mnFadeRate != 0 && mnFadeRate != 100)
maFadeTimer.Start(); maFadeIdle.Start();
return 0; return 0;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment