summaryrefslogtreecommitdiff
path: root/vcl/source/treelist/treelistbox.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/treelist/treelistbox.cxx')
-rw-r--r--vcl/source/treelist/treelistbox.cxx18
1 files changed, 15 insertions, 3 deletions
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index f2357b890fe2..6d023c0799a4 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -2606,6 +2606,7 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, tools::Long nLine, vcl:
Size aRectSize(0, nTempEntryHeight);
SvViewDataEntry* pViewDataEntry = GetViewDataEntry( &rEntry );
+ const bool bSeparator(rEntry.GetFlags() & SvTLEntryFlags::IS_SEPARATOR);
const size_t nTabCount = aTabs.size();
const size_t nItemCount = rEntry.ItemCount();
@@ -2738,8 +2739,8 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, tools::Long nLine, vcl:
rItem.Paint(aEntryPos, *this, rRenderContext, pViewDataEntry, rEntry);
- // division line between tabs
- if (pNextTab && rItem.GetType() == SvLBoxItemType::String &&
+ // division line between tabs (but not if this is a separator line)
+ if (!bSeparator && pNextTab && rItem.GetType() == SvLBoxItemType::String &&
// not at the right edge of the window!
aRect.Right() < nMaxRight)
{
@@ -2758,7 +2759,18 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, tools::Long nLine, vcl:
rRenderContext.Push();
rRenderContext.SetLineColor(rSettings.GetDeactiveColor());
rRenderContext.SetFillColor(rSettings.GetDeactiveColor());
- rRenderContext.DrawRect(tools::Rectangle(Point(0, nLine), Size(nWidth, 2)));
+
+ const bool bAsTree = GetStyle() & (WB_HASLINES | WB_HASLINESATROOT);
+ if (bAsTree)
+ {
+ rRenderContext.DrawRect(tools::Rectangle(Point(0, nLine + nTempEntryHeight - 2), Size(nWidth, 2)));
+ rRenderContext.DrawRect(tools::Rectangle(Point(0, nLine), Size(nWidth, 2)));
+ }
+ else
+ {
+ rRenderContext.DrawRect(tools::Rectangle(Point(0, nLine), Size(nWidth, 2)));
+ }
+
rRenderContext.Pop();
}