summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-28 18:42:39 +0900
committerTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2015-05-28 18:56:01 +0900
commit02482eef0189e6c9f6ea233d495c9fd8a0d2a877 (patch)
tree9594b9c918a869da56e9030f95f3de407af83e30
parentee25bc3cad9f31a253c2a0b0297516c7f0989222 (diff)
fix drawing treelistbox with redefined background in dbaccess
Change-Id: Ia55797e3e42309f9d37d5335088f7657d99954de
-rw-r--r--dbaccess/source/ui/app/AppDetailView.cxx6
-rw-r--r--svtools/source/contnr/treelistbox.cxx12
2 files changed, 13 insertions, 5 deletions
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx
index 0ae17bf52169..7329b0b4cd3a 100644
--- a/dbaccess/source/ui/app/AppDetailView.cxx
+++ b/dbaccess/source/ui/app/AppDetailView.cxx
@@ -87,6 +87,8 @@ OCreationList::OCreationList( OTasksWindow& _rParent )
void OCreationList::Paint(vcl::RenderContext& rRenderContext, const Rectangle& _rRect )
{
+ SetBackground();
+
if (m_pMouseDownEntry)
m_aOriginalFont = rRenderContext.GetFont();
@@ -119,11 +121,13 @@ void OCreationList::PreparePaint(vcl::RenderContext& rRenderContext, SvTreeListE
// 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();
+ _pEntry->SetBackColor(Color(COL_TRANSPARENT));
}
}
rRenderContext.SetBackground(aEntryBackground);
+ _pEntry->SetBackColor(aEntryBackground.GetColor());
}
void OCreationList::SelectSearchEntry( const void* _pEntry )
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index abe9ad36c34f..1ae251710aad 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -3043,10 +3043,14 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry, long nLine, vcl::Render
// realize tab listboxes with lines.
if (!(nCurTab == 0 && (nTreeFlags & SvTreeFlags::USESEL) && nFirstSelTab))
{
- rRenderContext.SetFillColor(aWallpaper.GetColor());
- // this case may occur for smaller horizontal resizes
- if (aRect.Left() < aRect.Right())
- rRenderContext.DrawRect(aRect);
+ Color aBackgroundColor = aWallpaper.GetColor();
+ if (aBackgroundColor != Color(COL_TRANSPARENT))
+ {
+ rRenderContext.SetFillColor(aBackgroundColor);
+ // this case may occur for smaller horizontal resizes
+ if (aRect.Left() < aRect.Right())
+ rRenderContext.DrawRect(aRect);
+ }
}
// draw item
// center vertically