HierarchicalListView.st
changeset 5826 5c11c14b4250
parent 5818 1a211eba3ca9
child 5827 3b54a21f658e
--- a/HierarchicalListView.st	Wed Jul 04 03:32:54 2018 +0000
+++ b/HierarchicalListView.st	Wed Jul 04 08:06:47 2018 +0200
@@ -1024,14 +1024,16 @@
         x0 := self xVisibleOfVerticalLineAt:(itemLevel + 1).
 
         (x0 between:xL and:xR) ifTrue:[
-            y0 := self yVisibleOfIndicatorForItem:item.
-            y1 := self yVisibleOfIndicatorForItem:(item last).
+            y0 := (self yVisibleOfIndicatorForItemBottom:item)-2.
+            y1 := (self yVisibleOfIndicatorForItem:(item last)).
 
             y1 > y0 ifTrue:[
                 self displayLineFromX:x0 y:y0 toX:x0 y:y1.
             ].
         ].
     ].
+
+    "Modified: / 04-07-2018 / 08:00:33 / Claus Gittinger"
 !
 
 validateDrawableIconFor:anItem
@@ -1560,6 +1562,8 @@
 !
 
 yVisibleOfIndicatorForItem:anItem
+    "return the y of the vertical center of anItem" 
+
     |index y0 y1|
 
     index := list identityIndexOf:anItem.
@@ -1570,6 +1574,38 @@
         ^ (y0 + y1) // 2.
     ].
     ^ 0
+
+    "Modified (comment): / 04-07-2018 / 07:57:01 / Claus Gittinger"
+!
+
+yVisibleOfIndicatorForItemBottom:anItem
+    "return the y of the vertical bottom of anItem" 
+
+    |index y|
+
+    index := list identityIndexOf:anItem.
+    index > 0 ifTrue:[
+        y := self yVisibleOfLine:(index+1).
+        ^ y
+    ].
+    ^ 0
+
+    "Created: / 04-07-2018 / 07:56:31 / Claus Gittinger"
+!
+
+yVisibleOfIndicatorForItemTop:anItem
+    "return the y of the vertical top of anItem" 
+
+    |index y|
+
+    index := list identityIndexOf:anItem.
+    index > 0 ifTrue:[
+        y := self yVisibleOfLine:index.
+        ^ y
+    ].
+    ^ 0
+
+    "Created: / 04-07-2018 / 07:57:25 / Claus Gittinger"
 ! !
 
 !HierarchicalListView methodsFor:'queries'!