Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
f7ffa5f1
Kaydet (Commit)
f7ffa5f1
authored
Eki 12, 2011
tarafından
Cédric Bosdonnat
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Header/Footer: Implemented fade in/out
üst
01e70412
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
5 deletions
+53
-5
HeaderFooterWin.cxx
sw/source/ui/docvw/HeaderFooterWin.cxx
+46
-4
PageBreakWin.cxx
sw/source/ui/docvw/PageBreakWin.cxx
+1
-1
HeaderFooterWin.hxx
sw/source/ui/inc/HeaderFooterWin.hxx
+6
-0
No files found.
sw/source/ui/docvw/HeaderFooterWin.cxx
Dosyayı görüntüle @
f7ffa5f1
...
@@ -53,6 +53,7 @@
...
@@ -53,6 +53,7 @@
#include <drawinglayer/attribute/fillgradientattribute.hxx>
#include <drawinglayer/attribute/fillgradientattribute.hxx>
#include <drawinglayer/attribute/fontattribute.hxx>
#include <drawinglayer/attribute/fontattribute.hxx>
#include <drawinglayer/primitive2d/fillgradientprimitive2d.hxx>
#include <drawinglayer/primitive2d/fillgradientprimitive2d.hxx>
#include <drawinglayer/primitive2d/modifiedcolorprimitive2d.hxx>
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/polygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/polypolygonprimitive2d.hxx>
#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
#include <drawinglayer/primitive2d/textlayoutdevice.hxx>
...
@@ -149,7 +150,10 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwPageFrm* pPag
...
@@ -149,7 +150,10 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwPageFrm* pPag
m_bIsHeader
(
bHeader
),
m_bIsHeader
(
bHeader
),
m_bReadonly
(
false
),
m_bReadonly
(
false
),
m_pPopupMenu
(
NULL
),
m_pPopupMenu
(
NULL
),
m_pLine
(
NULL
)
m_pLine
(
NULL
),
m_bIsAppearing
(
false
),
m_nFadeRate
(
100
),
m_aFadeTimer
(
)
{
{
// Get the font and configure it
// Get the font and configure it
Font
aFont
=
GetSettings
().
GetStyleSettings
().
GetToolFont
();
Font
aFont
=
GetSettings
().
GetStyleSettings
().
GetToolFont
();
...
@@ -186,6 +190,9 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwPageFrm* pPag
...
@@ -186,6 +190,9 @@ SwHeaderFooterWin::SwHeaderFooterWin( SwEditWin* pEditWin, const SwPageFrm* pPag
aText
=
m_pPopupMenu
->
GetItemText
(
FN_HEADERFOOTER_DELETE
);
aText
=
m_pPopupMenu
->
GetItemText
(
FN_HEADERFOOTER_DELETE
);
m_pPopupMenu
->
SetItemText
(
FN_HEADERFOOTER_DELETE
,
aRewriter
.
Apply
(
aText
)
);
m_pPopupMenu
->
SetItemText
(
FN_HEADERFOOTER_DELETE
,
aRewriter
.
Apply
(
aText
)
);
SetPopupMenu
(
m_pPopupMenu
);
SetPopupMenu
(
m_pPopupMenu
);
m_aFadeTimer
.
SetTimeout
(
500
);
m_aFadeTimer
.
SetTimeoutHdl
(
LINK
(
this
,
SwHeaderFooterWin
,
FadeHandler
)
);
}
}
SwHeaderFooterWin
::~
SwHeaderFooterWin
(
)
SwHeaderFooterWin
::~
SwHeaderFooterWin
(
)
...
@@ -229,8 +236,13 @@ void SwHeaderFooterWin::SetOffset( Point aOffset, long nXLineStart, long nXLineE
...
@@ -229,8 +236,13 @@ void SwHeaderFooterWin::SetOffset( Point aOffset, long nXLineStart, long nXLineE
void
SwHeaderFooterWin
::
ShowAll
(
bool
bShow
)
void
SwHeaderFooterWin
::
ShowAll
(
bool
bShow
)
{
{
Show
(
bShow
);
if
(
!
PopupMenu
::
IsInExecute
()
)
m_pLine
->
Show
(
bShow
);
{
m_bIsAppearing
=
bShow
;
if
(
m_aFadeTimer
.
IsActive
(
)
)
m_aFadeTimer
.
Stop
();
m_aFadeTimer
.
Start
(
);
}
}
}
void
SwHeaderFooterWin
::
Paint
(
const
Rectangle
&
)
void
SwHeaderFooterWin
::
Paint
(
const
Rectangle
&
)
...
@@ -356,8 +368,12 @@ void SwHeaderFooterWin::Paint( const Rectangle& )
...
@@ -356,8 +368,12 @@ void SwHeaderFooterWin::Paint( const Rectangle& )
*
this
,
aNewViewInfos
);
*
this
,
aNewViewInfos
);
// TODO Ghost it all if needed
// TODO Ghost it all if needed
Primitive2DSequence
aGhostedSeq
(
1
);
double
nFadeRate
=
double
(
m_nFadeRate
)
/
100.0
;
aGhostedSeq
[
0
]
=
Primitive2DReference
(
new
ModifiedColorPrimitive2D
(
aSeq
,
BColorModifier
(
Color
(
COL_WHITE
).
getBColor
(),
1.0
-
nFadeRate
,
BCOLORMODIFYMODE_INTERPOLATE
)
)
);
pProcessor
->
process
(
aSeq
);
pProcessor
->
process
(
a
Ghosted
Seq
);
}
}
bool
SwHeaderFooterWin
::
IsEmptyHeaderFooter
(
)
bool
SwHeaderFooterWin
::
IsEmptyHeaderFooter
(
)
...
@@ -482,4 +498,30 @@ void SwHeaderFooterWin::Select( )
...
@@ -482,4 +498,30 @@ void SwHeaderFooterWin::Select( )
ExecuteCommand
(
GetCurItemId
()
);
ExecuteCommand
(
GetCurItemId
()
);
}
}
IMPL_LINK
(
SwHeaderFooterWin
,
FadeHandler
,
Timer
*
,
EMPTYARG
)
{
if
(
m_bIsAppearing
&&
m_nFadeRate
>
0
)
m_nFadeRate
-=
10
;
else
if
(
!
m_bIsAppearing
&&
m_nFadeRate
<
100
)
m_nFadeRate
+=
10
;
if
(
m_nFadeRate
!=
100
&&
!
IsVisible
()
)
{
Show
(
true
);
m_pLine
->
Show
(
true
);
}
else
if
(
m_nFadeRate
==
100
&&
IsVisible
(
)
)
{
Show
(
false
);
m_pLine
->
Show
(
false
);
}
else
Invalidate
();
if
(
IsVisible
(
)
&&
m_nFadeRate
>
0
&&
m_nFadeRate
<
100
)
m_aFadeTimer
.
Start
();
return
0
;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
sw/source/ui/docvw/PageBreakWin.cxx
Dosyayı görüntüle @
f7ffa5f1
...
@@ -376,7 +376,7 @@ void SwPageBreakWin::MouseMove( const MouseEvent& rMEvt )
...
@@ -376,7 +376,7 @@ void SwPageBreakWin::MouseMove( const MouseEvent& rMEvt )
void
SwPageBreakWin
::
Activate
(
)
void
SwPageBreakWin
::
Activate
(
)
{
{
m_aFadeTimer
.
Stop
(
);
Fade
(
true
);
MenuButton
::
Activate
();
MenuButton
::
Activate
();
}
}
...
...
sw/source/ui/inc/HeaderFooterWin.hxx
Dosyayı görüntüle @
f7ffa5f1
...
@@ -44,6 +44,9 @@ class SwHeaderFooterWin : public MenuButton, public SwFrameControl
...
@@ -44,6 +44,9 @@ class SwHeaderFooterWin : public MenuButton, public SwFrameControl
bool
m_bReadonly
;
bool
m_bReadonly
;
PopupMenu
*
m_pPopupMenu
;
PopupMenu
*
m_pPopupMenu
;
Window
*
m_pLine
;
Window
*
m_pLine
;
bool
m_bIsAppearing
;
int
m_nFadeRate
;
Timer
m_aFadeTimer
;
public
:
public
:
SwHeaderFooterWin
(
SwEditWin
*
pEditWin
,
const
SwPageFrm
*
pPageFrm
,
bool
bHeader
);
SwHeaderFooterWin
(
SwEditWin
*
pEditWin
,
const
SwPageFrm
*
pPageFrm
,
bool
bHeader
);
...
@@ -64,6 +67,9 @@ public:
...
@@ -64,6 +67,9 @@ public:
void
ExecuteCommand
(
sal_uInt16
nSlot
);
void
ExecuteCommand
(
sal_uInt16
nSlot
);
void
SetReadonly
(
bool
bReadonly
);
void
SetReadonly
(
bool
bReadonly
);
private
:
DECL_LINK
(
FadeHandler
,
Timer
*
);
};
};
#endif
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment