Kaydet (Commit) 02482eef authored tarafından Tomaž Vajngerl's avatar Tomaž Vajngerl

fix drawing treelistbox with redefined background in dbaccess

Change-Id: Ia55797e3e42309f9d37d5335088f7657d99954de
üst ee25bc3c
...@@ -87,6 +87,8 @@ OCreationList::OCreationList( OTasksWindow& _rParent ) ...@@ -87,6 +87,8 @@ OCreationList::OCreationList( OTasksWindow& _rParent )
void OCreationList::Paint(vcl::RenderContext& rRenderContext, const Rectangle& _rRect ) void OCreationList::Paint(vcl::RenderContext& rRenderContext, const Rectangle& _rRect )
{ {
SetBackground();
if (m_pMouseDownEntry) if (m_pMouseDownEntry)
m_aOriginalFont = rRenderContext.GetFont(); m_aOriginalFont = rRenderContext.GetFont();
...@@ -119,11 +121,13 @@ void OCreationList::PreparePaint(vcl::RenderContext& rRenderContext, SvTreeListE ...@@ -119,11 +121,13 @@ void OCreationList::PreparePaint(vcl::RenderContext& rRenderContext, SvTreeListE
// and temporary set a transparent background, for all the other // and temporary set a transparent background, for all the other
// paint operations the SvTreeListBox is going to do // paint operations the SvTreeListBox is going to do
aEntryBackground = Wallpaper(Color(COL_TRANSPARENT)); aEntryBackground = Wallpaper();
_pEntry->SetBackColor(Color(COL_TRANSPARENT));
} }
} }
rRenderContext.SetBackground(aEntryBackground); rRenderContext.SetBackground(aEntryBackground);
_pEntry->SetBackColor(aEntryBackground.GetColor());
} }
void OCreationList::SelectSearchEntry( const void* _pEntry ) void OCreationList::SelectSearchEntry( const void* _pEntry )
......
...@@ -3043,10 +3043,14 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry, long nLine, vcl::Render ...@@ -3043,10 +3043,14 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry, long nLine, vcl::Render
// realize tab listboxes with lines. // realize tab listboxes with lines.
if (!(nCurTab == 0 && (nTreeFlags & SvTreeFlags::USESEL) && nFirstSelTab)) if (!(nCurTab == 0 && (nTreeFlags & SvTreeFlags::USESEL) && nFirstSelTab))
{ {
rRenderContext.SetFillColor(aWallpaper.GetColor()); Color aBackgroundColor = aWallpaper.GetColor();
// this case may occur for smaller horizontal resizes if (aBackgroundColor != Color(COL_TRANSPARENT))
if (aRect.Left() < aRect.Right()) {
rRenderContext.DrawRect(aRect); rRenderContext.SetFillColor(aBackgroundColor);
// this case may occur for smaller horizontal resizes
if (aRect.Left() < aRect.Right())
rRenderContext.DrawRect(aRect);
}
} }
// draw item // draw item
// center vertically // center vertically
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment