[Libreoffice-commits] core.git: Branch 'feature/priorities' - svtools/source sw/source

Jennifer Liebel jliebel94 at gmail.com
Wed Nov 5 04:22:32 PST 2014


 svtools/source/control/tabbar.cxx |    4 ++--
 sw/source/uibase/inc/swruler.hxx  |    2 +-
 sw/source/uibase/misc/swruler.cxx |   10 +++++-----
 3 files changed, 8 insertions(+), 8 deletions(-)

New commits:
commit c3594db5cb88bb7cf30ac535c11e9e8403692357
Author: Jennifer Liebel <jliebel94 at gmail.com>
Date:   Wed Nov 5 12:21:07 2014 +0000

    changed timer to idle
    
    Change-Id: I321ddf0411bf66ffce648f6d27e1669194bf80db

diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx
index 2e8fa76..5a10935 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 19b877f..015815c 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 172a0b3..8b374b9 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;
 }
 


More information about the Libreoffice-commits mailing list