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
85b7494e
Kaydet (Commit)
85b7494e
authored
May 14, 2015
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
refactor ScTabSplitter to use RenderContext
Change-Id: I0822bf2fc8752efa16add193b2860c6f9f9668e3
üst
763858b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
29 deletions
+30
-29
tabsplit.cxx
sc/source/ui/view/tabsplit.cxx
+30
-29
No files found.
sc/source/ui/view/tabsplit.cxx
Dosyayı görüntüle @
85b7494e
...
@@ -24,11 +24,11 @@
...
@@ -24,11 +24,11 @@
#include <vcl/settings.hxx>
#include <vcl/settings.hxx>
ScTabSplitter
::
ScTabSplitter
(
vcl
::
Window
*
pParent
,
WinBits
nWinStyle
,
ScViewData
*
pData
)
:
ScTabSplitter
::
ScTabSplitter
(
vcl
::
Window
*
pParent
,
WinBits
nWinStyle
,
ScViewData
*
pData
)
:
Splitter
(
pParent
,
nWinStyle
),
Splitter
(
pParent
,
nWinStyle
),
pViewData
(
pData
)
pViewData
(
pData
)
{
{
SetFixed
(
false
);
SetFixed
(
false
);
EnableRTL
(
false
);
EnableRTL
(
false
);
}
}
ScTabSplitter
::~
ScTabSplitter
()
ScTabSplitter
::~
ScTabSplitter
()
...
@@ -54,10 +54,10 @@ void ScTabSplitter::SetFixed(bool bSet)
...
@@ -54,10 +54,10 @@ void ScTabSplitter::SetFixed(bool bSet)
SetPointer
(
POINTER_VSPLIT
);
SetPointer
(
POINTER_VSPLIT
);
}
}
void
ScTabSplitter
::
Paint
(
vcl
::
RenderContext
&
/*rRenderContext*/
,
const
Rectangle
&
rRect
)
void
ScTabSplitter
::
Paint
(
vcl
::
RenderContext
&
rRenderContext
,
const
Rectangle
&
rRect
)
{
{
const
Color
oldFillCol
=
GetFillColor
(
);
rRenderContext
.
Push
(
PushFlags
::
FILLCOLOR
|
PushFlags
::
LINECOLOR
);
const
Color
oldLineCol
=
GetLineColor
();
const
StyleSettings
&
rStyleSettings
=
rRenderContext
.
GetSettings
().
GetStyleSettings
();
if
(
IsHorizontal
())
if
(
IsHorizontal
())
{
{
...
@@ -65,24 +65,25 @@ void ScTabSplitter::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectang
...
@@ -65,24 +65,25 @@ void ScTabSplitter::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectang
{
{
case
SC_SPLIT_NONE
:
case
SC_SPLIT_NONE
:
{
{
SetLineColor
(
GetSettings
().
GetStyleSettings
()
.
GetShadowColor
());
rRenderContext
.
SetLineColor
(
rStyleSettings
.
GetShadowColor
());
SetFillColor
(
GetSettings
().
GetStyleSettings
()
.
GetShadowColor
());
rRenderContext
.
SetFillColor
(
rStyleSettings
.
GetShadowColor
());
DrawRect
(
Rectangle
(
rRect
.
Left
(),
rRect
.
Top
(),
rRect
.
Right
(),
rRect
.
Bottom
()));
rRenderContext
.
DrawRect
(
Rectangle
(
rRect
.
Left
(),
rRect
.
Top
(),
rRect
.
Right
(),
rRect
.
Bottom
()));
// Draw handle
// Draw handle
SetLineColor
(
Color
(
COL_BLACK
));
rRenderContext
.
SetLineColor
(
Color
(
COL_BLACK
));
SetFillColor
(
Color
(
COL_BLACK
));
rRenderContext
.
SetFillColor
(
Color
(
COL_BLACK
));
const
long
xc
=
rRect
.
Right
()
+
rRect
.
Left
();
const
long
xc
=
rRect
.
Right
()
+
rRect
.
Left
();
const
long
h4
=
rRect
.
GetHeight
()
/
4
;
const
long
h4
=
rRect
.
GetHeight
()
/
4
;
// First xc fraction is truncated, second one is rounded. This will draw a centered line
// First xc fraction is truncated, second one is rounded. This will draw a centered line
// in handlers with odd width and a centered rectangle in those with even width.
// in handlers with odd width and a centered rectangle in those with even width.
DrawRect
(
Rectangle
(
Point
(
xc
/
2
,
rRect
.
Top
()
+
h4
),
Point
((
xc
+
1
)
/
2
,
rRect
.
Bottom
()
-
h4
)));
rRenderContext
.
DrawRect
(
Rectangle
(
Point
(
xc
/
2
,
rRect
.
Top
()
+
h4
),
Point
((
xc
+
1
)
/
2
,
rRect
.
Bottom
()
-
h4
)));
break
;
break
;
}
}
case
SC_SPLIT_NORMAL
:
case
SC_SPLIT_NORMAL
:
SetLineColor
(
GetSettings
().
GetStyleSettings
()
.
GetShadowColor
());
rRenderContext
.
SetLineColor
(
rStyleSettings
.
GetShadowColor
());
SetFillColor
(
GetSettings
().
GetStyleSettings
()
.
GetShadowColor
());
rRenderContext
.
SetFillColor
(
rStyleSettings
.
GetShadowColor
());
DrawRect
(
Rectangle
(
rRect
.
Left
(),
rRect
.
Top
(),
rRect
.
Right
(),
rRect
.
Bottom
()));
rRenderContext
.
DrawRect
(
Rectangle
(
rRect
.
Left
(),
rRect
.
Top
(),
rRect
.
Right
(),
rRect
.
Bottom
()));
break
;
break
;
case
SC_SPLIT_FIX
:
case
SC_SPLIT_FIX
:
// Nothing to draw
// Nothing to draw
...
@@ -95,24 +96,25 @@ void ScTabSplitter::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectang
...
@@ -95,24 +96,25 @@ void ScTabSplitter::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectang
{
{
case
SC_SPLIT_NONE
:
case
SC_SPLIT_NONE
:
{
{
SetLineColor
(
GetSettings
().
GetStyleSettings
()
.
GetShadowColor
());
rRenderContext
.
SetLineColor
(
rStyleSettings
.
GetShadowColor
());
SetFillColor
(
GetSettings
().
GetStyleSettings
()
.
GetShadowColor
());
rRenderContext
.
SetFillColor
(
rStyleSettings
.
GetShadowColor
());
DrawRect
(
Rectangle
(
rRect
.
Left
(),
rRect
.
Top
(),
rRect
.
Right
(),
rRect
.
Bottom
()));
rRenderContext
.
DrawRect
(
Rectangle
(
rRect
.
Left
(),
rRect
.
Top
(),
rRect
.
Right
(),
rRect
.
Bottom
()));
// Draw handle
// Draw handle
SetLineColor
(
Color
(
COL_BLACK
));
rRenderContext
.
SetLineColor
(
Color
(
COL_BLACK
));
SetFillColor
(
Color
(
COL_BLACK
));
rRenderContext
.
SetFillColor
(
Color
(
COL_BLACK
));
const
long
yc
=
rRect
.
Top
()
+
rRect
.
Bottom
();
const
long
yc
=
rRect
.
Top
()
+
rRect
.
Bottom
();
const
long
w4
=
rRect
.
GetWidth
()
/
4
;
const
long
w4
=
rRect
.
GetWidth
()
/
4
;
// First yc fraction is truncated, second one is rounded. This will draw a centered line
// First yc fraction is truncated, second one is rounded. This will draw a centered line
// in handlers with odd height and a centered rectangle in those with even height.
// in handlers with odd height and a centered rectangle in those with even height.
DrawRect
(
Rectangle
(
Point
(
rRect
.
Left
()
+
w4
,
yc
/
2
),
Point
(
rRect
.
Right
()
-
w4
,
(
yc
+
1
)
/
2
)));
DrawRect
(
Rectangle
(
Point
(
rRect
.
Left
()
+
w4
,
yc
/
2
),
Point
(
rRect
.
Right
()
-
w4
,
(
yc
+
1
)
/
2
)));
break
;
break
;
}
}
case
SC_SPLIT_NORMAL
:
case
SC_SPLIT_NORMAL
:
SetLineColor
(
GetSettings
().
GetStyleSettings
()
.
GetShadowColor
());
rRenderContext
.
SetLineColor
(
rStyleSettings
.
GetShadowColor
());
SetFillColor
(
GetSettings
().
GetStyleSettings
()
.
GetShadowColor
());
rRenderContext
.
SetFillColor
(
rStyleSettings
.
GetShadowColor
());
DrawRect
(
Rectangle
(
rRect
.
Left
(),
rRect
.
Top
(),
rRect
.
Right
(),
rRect
.
Bottom
()));
rRenderContext
.
DrawRect
(
Rectangle
(
rRect
.
Left
(),
rRect
.
Top
(),
rRect
.
Right
(),
rRect
.
Bottom
()));
break
;
break
;
case
SC_SPLIT_FIX
:
case
SC_SPLIT_FIX
:
// Nothing to draw
// Nothing to draw
...
@@ -120,8 +122,7 @@ void ScTabSplitter::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectang
...
@@ -120,8 +122,7 @@ void ScTabSplitter::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectang
}
}
}
}
SetFillColor
(
oldFillCol
);
rRenderContext
.
Pop
();
SetLineColor
(
oldLineCol
);
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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