[PATCH] Improved Header/Footer UI framerate

Thomas Collerton tom.coll91 at gmail.com
Fri Nov 18 03:17:13 PST 2011


---
 sw/source/ui/docvw/HeaderFooterWin.cxx |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx
b/sw/source/ui/docvw/HeaderFooterWin.cxx
index 1db769a..076ce17 100644
--- a/sw/source/ui/docvw/HeaderFooterWin.cxx
+++ b/sw/source/ui/docvw/HeaderFooterWin.cxx
@@ -191,7 +191,7 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin*
pEditWin, const SwPageFrm* pPag
     m_pPopupMenu->SetItemText( FN_HEADERFOOTER_DELETE, aRewriter.Apply(
aText ) );
     SetPopupMenu( m_pPopupMenu );

-    m_aFadeTimer.SetTimeout( 500 );
+    m_aFadeTimer.SetTimeout( 50 );
     m_aFadeTimer.SetTimeoutHdl( LINK( this, SwHeaderFooterWin, FadeHandler
) );
 }

@@ -501,9 +501,9 @@ void SwHeaderFooterWin::Select( )
 IMPL_LINK( SwHeaderFooterWin, FadeHandler, Timer *, EMPTYARG )
 {
     if ( m_bIsAppearing && m_nFadeRate > 0 )
-        m_nFadeRate -= 10;
+        m_nFadeRate -= 25;
     else if ( !m_bIsAppearing && m_nFadeRate < 100 )
-        m_nFadeRate += 10;
+        m_nFadeRate += 25;

     if ( m_nFadeRate != 100 && !IsVisible() )
     {
-- 
1.7.7.3

2011/11/18 Thomas Collerton <tom.coll91 at gmail.com>

> Hello, here's a small patch which improves the the framerate of the new
> Header/Footer UI in Writer. Released under LGPLv3

--f46d04446a67afd10f04b2009cf9
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div>From b453cefde0fcc6ec7eb7507fce1f204642c154a0 Mon Sep 17 00:00:00 2001=
</div><div>From: Thomas Collerton &lt;<a href=3D"mailto:tom.coll91 at gmail.co=
m">tom.coll91 at gmail.com</a>&gt;</div><div>Date: Fri, 18 Nov 2011 12:17:13 +=
0100</div>
<div>Subject: [PATCH] Improved Header/Footer UI framerate</div><div><br></d=
iv><div>---</div><div>=A0sw/source/ui/docvw/HeaderFooterWin.cxx | =A0 =A06 =
+++---</div><div>=A01 files changed, 3 insertions(+), 3 deletions(-)</div><=
div>
<br></div><div>diff --git a/sw/source/ui/docvw/HeaderFooterWin.cxx b/sw/sou=
rce/ui/docvw/HeaderFooterWin.cxx</div><div>index 1db769a..076ce17 100644</d=
iv><div>--- a/sw/source/ui/docvw/HeaderFooterWin.cxx</div><div>+++ b/sw/sou=
rce/ui/docvw/HeaderFooterWin.cxx</div>
<div>@@ -191,7 +191,7 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* p=
EditWin, const SwPageFrm* pPag</div><div>=A0 =A0 =A0m_pPopupMenu-&gt;SetIte=
mText( FN_HEADERFOOTER_DELETE, aRewriter.Apply( aText ) );</div><div>=A0 =
=A0 =A0SetPopupMenu( m_pPopupMenu );</div>
<div>=A0</div><div>- =A0 =A0m_aFadeTimer.SetTimeout( 500 );</div><div>+ =A0=
 =A0m_aFadeTimer.SetTimeout( 50 );</div><div>=A0 =A0 =A0m_aFadeTimer.SetTim=
eoutHdl( LINK( this, SwHeaderFooterWin, FadeHandler ) );</div><div>=A0}</di=
v><div>=A0</div>
<div>@@ -501,9 +501,9 @@ void SwHeaderFooterWin::Select( )</div><div>=A0IMP=
L_LINK( SwHeaderFooterWin, FadeHandler, Timer *, EMPTYARG )</div><div>=A0{<=
/div><div>=A0 =A0 =A0if ( m_bIsAppearing &amp;&amp; m_nFadeRate &gt; 0 )</d=
iv><div>
- =A0 =A0 =A0 =A0m_nFadeRate -=3D 10;</div><div>+ =A0 =A0 =A0 =A0m_nFadeRat=
e -=3D 25;</div><div>=A0 =A0 =A0else if ( !m_bIsAppearing &amp;&amp; m_nFad=
eRate &lt; 100 )</div><div>- =A0 =A0 =A0 =A0m_nFadeRate +=3D 10;</div><div>=
+ =A0 =A0 =A0 =A0m_nFadeRate +=3D 25;</div>
<div>=A0</div><div>=A0 =A0 =A0if ( m_nFadeRate !=3D 100 &amp;&amp; !IsVisib=
le() )</div><div>=A0 =A0 =A0{</div><div>--=A0</div><div>1.7.7.3</div><br><d=
iv class=3D"gmail_quote">2011/11/18 Thomas Collerton <span dir=3D"ltr">&lt;=
<a href=3D"mailto:tom.coll91 at gmail.com">tom.coll91 at gmail.com</a>&gt;</span>=
<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;">Hello, here&#39;s a small patch which impro=
ves the the framerate of the new Header/Footer UI in Writer. Released under=
 LGPLv3
</blockquote></div><br>

--f46d04446a67afd10f04b2009cf9--


More information about the LibreOffice mailing list