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
e27ee95c
Kaydet (Commit)
e27ee95c
authored
May 18, 2015
tarafından
Tomaž Vajngerl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
pass RenderContext to PreparePaint in TreeListBox
Change-Id: I32961f5cd511b9ecc756e99ca95e4e9ddbc6b795
üst
a97fc29f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
27 deletions
+27
-27
AppDetailView.cxx
dbaccess/source/ui/app/AppDetailView.cxx
+12
-11
AppDetailView.hxx
dbaccess/source/ui/app/AppDetailView.hxx
+2
-2
treelistbox.hxx
include/svtools/treelistbox.hxx
+1
-1
treelistbox.cxx
svtools/source/contnr/treelistbox.cxx
+12
-13
No files found.
dbaccess/source/ui/app/AppDetailView.cxx
Dosyayı görüntüle @
e27ee95c
...
...
@@ -98,31 +98,32 @@ void OCreationList::Paint(vcl::RenderContext& rRenderContext, const Rectangle& _
rRenderContext
.
SetFont
(
m_aOriginalFont
);
}
void
OCreationList
::
PreparePaint
(
SvTreeListEntry
*
_pEntry
)
void
OCreationList
::
PreparePaint
(
vcl
::
RenderContext
&
rRenderContext
,
SvTreeListEntry
*
_pEntry
)
{
Wallpaper
aEntryBackground
(
m_aOriginalBackgroundColor
);
if
(
_pEntry
)
Wallpaper
aEntryBackground
(
m_aOriginalBackgroundColor
);
if
(
_pEntry
)
{
if
(
_pEntry
==
GetCurEntry
()
)
if
(
_pEntry
==
GetCurEntry
()
)
{
// draw a selection background
bool
bIsMouseDownEntry
=
(
_pEntry
==
m_pMouseDownEntry
);
DrawSelectionBackground
(
GetBoundingRect
(
_pEntry
),
bIsMouseDownEntry
?
1
:
2
,
false
,
true
,
false
);
vcl
::
RenderTools
::
DrawSelectionBackground
(
rRenderContext
,
*
this
,
GetBoundingRect
(
_pEntry
),
bIsMouseDownEntry
?
1
:
2
,
false
,
true
,
false
);
if
(
bIsMouseDownEntry
)
if
(
bIsMouseDownEntry
)
{
vcl
::
Font
aFont
(
GetFont
()
);
aFont
.
SetColor
(
GetSettings
().
GetStyleSettings
().
GetHighlightTextColor
()
);
Control
::
SetFont
(
aFont
);
vcl
::
Font
aFont
(
rRenderContext
.
GetFont
()
);
aFont
.
SetColor
(
rRenderContext
.
GetSettings
().
GetStyleSettings
().
GetHighlightTextColor
()
);
rRenderContext
.
SetFont
(
aFont
);
}
// and temporary set a transparent background, for all the other
// paint operations the SvTreeListBox is going to do
aEntryBackground
=
Wallpaper
(
Color
(
COL_TRANSPARENT
)
);
aEntryBackground
=
Wallpaper
(
Color
(
COL_TRANSPARENT
)
);
}
}
SetBackground
(
aEntryBackground
);
rRenderContext
.
SetBackground
(
aEntryBackground
);
}
void
OCreationList
::
SelectSearchEntry
(
const
void
*
_pEntry
)
...
...
dbaccess/source/ui/app/AppDetailView.hxx
Dosyayı görüntüle @
e27ee95c
...
...
@@ -61,7 +61,7 @@ namespace dbaui
virtual
void
MouseButtonDown
(
const
MouseEvent
&
rMEvt
)
SAL_OVERRIDE
;
virtual
void
MouseButtonUp
(
const
MouseEvent
&
rMEvt
)
SAL_OVERRIDE
;
virtual
void
KeyInput
(
const
KeyEvent
&
rKEvt
)
SAL_OVERRIDE
;
virtual
void
Paint
(
vcl
::
RenderContext
&
rRenderContext
,
const
Rectangle
&
rRect
)
SAL_OVERRIDE
;
virtual
void
Paint
(
vcl
::
RenderContext
&
rRenderContext
,
const
Rectangle
&
rRect
)
SAL_OVERRIDE
;
virtual
void
StartDrag
(
sal_Int8
_nAction
,
const
Point
&
_rPosPixel
)
SAL_OVERRIDE
;
virtual
void
GetFocus
()
SAL_OVERRIDE
;
virtual
void
LoseFocus
()
SAL_OVERRIDE
;
...
...
@@ -71,7 +71,7 @@ namespace dbaui
void
updateHelpText
();
protected
:
virtual
void
PreparePaint
(
SvTreeListEntry
*
_pEntry
)
SAL_OVERRIDE
;
virtual
void
PreparePaint
(
vcl
::
RenderContext
&
rRenderContext
,
SvTreeListEntry
*
_pEntry
)
SAL_OVERRIDE
;
virtual
Rectangle
GetFocusRect
(
SvTreeListEntry
*
_pEntry
,
long
_nLine
)
SAL_OVERRIDE
;
virtual
void
ModelHasCleared
()
SAL_OVERRIDE
;
...
...
include/svtools/treelistbox.hxx
Dosyayı görüntüle @
e27ee95c
...
...
@@ -617,7 +617,7 @@ protected:
virtual
void
Command
(
const
CommandEvent
&
rCEvt
)
SAL_OVERRIDE
;
virtual
void
RequestHelp
(
const
HelpEvent
&
rHEvt
)
SAL_OVERRIDE
;
virtual
void
PreparePaint
(
SvTreeListEntry
*
);
virtual
void
PreparePaint
(
vcl
::
RenderContext
&
rRenderContext
,
SvTreeListEntry
*
pEntry
);
virtual
void
DataChanged
(
const
DataChangedEvent
&
rDCEvt
)
SAL_OVERRIDE
;
void
InitSettings
(
bool
bFont
,
bool
bForeground
,
bool
bBackground
);
...
...
svtools/source/contnr/treelistbox.cxx
Dosyayı görüntüle @
e27ee95c
...
...
@@ -2565,7 +2565,7 @@ void SvTreeListBox::AdjustEntryHeightAndRecalc( const vcl::Font& rFont )
void
SvTreeListBox
::
Paint
(
vcl
::
RenderContext
&
rRenderContext
,
const
Rectangle
&
rRect
)
{
Control
::
Paint
(
rRenderContext
,
rRect
);
if
(
nTreeFlags
&
SvTreeFlags
::
RECALCTABS
)
if
(
nTreeFlags
&
SvTreeFlags
::
RECALCTABS
)
SetTabs
();
pImp
->
Paint
(
rRenderContext
,
rRect
);
...
...
@@ -2837,21 +2837,20 @@ SvTreeListEntry* SvTreeListBox::GetCurEntry() const
void
SvTreeListBox
::
ImplInitStyle
()
{
const
WinBits
nWindowStyle
=
GetStyle
();
nTreeFlags
|=
SvTreeFlags
::
RECALCTABS
;
if
(
nWindowStyle
&
WB_SORT
)
if
(
nWindowStyle
&
WB_SORT
)
{
GetModel
()
->
SetSortMode
(
SortAscending
);
GetModel
()
->
SetCompareHdl
(
LINK
(
this
,
SvTreeListBox
,
DefaultCompare
));
GetModel
()
->
SetSortMode
(
SortAscending
);
GetModel
()
->
SetCompareHdl
(
LINK
(
this
,
SvTreeListBox
,
DefaultCompare
));
}
else
{
GetModel
()
->
SetSortMode
(
SortNone
);
GetModel
()
->
SetCompareHdl
(
Link
<>
()
);
GetModel
()
->
SetSortMode
(
SortNone
);
GetModel
()
->
SetCompareHdl
(
Link
<>
()
);
}
pImp
->
SetStyle
(
nWindowStyle
);
pImp
->
SetStyle
(
nWindowStyle
);
pImp
->
Resize
();
Invalidate
();
}
...
...
@@ -2884,7 +2883,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry, long nLine, vcl::Render
Rectangle
aRect
;
// multi purpose
bool
bHorSBar
=
pImp
->
HasHorScrollBar
();
PreparePaint
(
pEntry
);
PreparePaint
(
rRenderContext
,
pEntry
);
pImp
->
UpdateContextBmpWidthMax
(
pEntry
);
...
...
@@ -2986,7 +2985,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry, long nLine, vcl::Render
{
// if the face color is bright then the deactive color is also bright
// -> so you can't see any deactive selection
if
(
bHideSelection
&&
!
rSettings
.
GetFaceColor
().
IsBright
()
if
(
bHideSelection
&&
!
rSettings
.
GetFaceColor
().
IsBright
()
&&
aWallpaper
.
GetColor
().
IsBright
()
!=
rSettings
.
GetDeactiveColor
().
IsBright
())
{
aNewWallColor
=
rSettings
.
GetDeactiveColor
();
...
...
@@ -3054,7 +3053,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry, long nLine, vcl::Render
// A custom selection that starts at a tab position > 0, do not fill
// the background of the 0th item, else e.g. we might not be able to
// realize tab listboxes with lines.
if
(
!
(
nCurTab
==
0
&&
(
nTreeFlags
&
SvTreeFlags
::
USESEL
)
&&
nFirstSelTab
))
if
(
!
(
nCurTab
==
0
&&
(
nTreeFlags
&
SvTreeFlags
::
USESEL
)
&&
nFirstSelTab
))
{
rRenderContext
.
SetFillColor
(
aWallpaper
.
GetColor
());
// this case may occur for smaller horizontal resizes
...
...
@@ -3087,7 +3086,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry, long nLine, vcl::Render
// cursor emphasis
rRenderContext
.
SetFillColor
();
Color
aOldLineColor
=
rRenderContext
.
GetLineColor
();
SetLineColor
(
Color
(
COL_BLACK
));
rRenderContext
.
SetLineColor
(
Color
(
COL_BLACK
));
aRect
=
GetFocusRect
(
pEntry
,
nLine
);
aRect
.
Top
()
++
;
aRect
.
Bottom
()
--
;
...
...
@@ -3197,7 +3196,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry, long nLine, vcl::Render
return
0
;
// nRowLen;
}
void
SvTreeListBox
::
PreparePaint
(
SvTreeListEntry
*
)
void
SvTreeListBox
::
PreparePaint
(
vcl
::
RenderContext
&
/*rRenderContext*/
,
SvTreeListEntry
*
/*pEntry*/
)
{
}
...
...
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