summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-12-03 12:12:12 +0000
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2021-12-07 17:23:11 +0100
commit6d685f7b1d600da749679853a4ba2fd9848f05c0 (patch)
treeadee81708b5ee14bbeaf1155fa8124a3dfe5c096
parent35c4abc1b209b40a936c62bdff0b055856851ef1 (diff)
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/+/126291 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit d6b003da6d77471e5e17a9cb6a25172d6f52da2a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126306 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
-rw-r--r--vcl/source/treelist/treelistbox.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index 197980774442..6d023c0799a4 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -2759,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();
}