vcl/source/treelist/treelistbox.cxx |   13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

New commits:
commit 41f736f9bea66657bde2f41afe506e376fe8548e
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Fri Dec 3 12:12:12 2021 +0000
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Fri Dec 3 15:39:05 2021 +0100

    tdf#145604 indicate the row as the target when dropping in a visual tree
    
    and indicate between rows when dropping in a visual list, which is what
    we are doing for the gtk version.
    
    a visual list case is tools, customize, menu and drag and drop the
    assigned commands around.
    a visual tree case is tools, macros, organize dialogs, use libraries
    to create two libraries, and move to dialog and create a dialog in
    one library, and drop it onto the other library to move it between
    libraries.
    
    Change-Id: Ia8dc944c1f411b1f072ad1c8dcc755a1e44e3b05
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126312
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/vcl/source/treelist/treelistbox.cxx 
b/vcl/source/treelist/treelistbox.cxx
index 58a1a006d72e..f8cfaaf6a311 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -2741,7 +2741,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();
     }
 

Reply via email to