--- a/HierarchicalListView.st Wed Oct 09 16:29:33 2002 +0200
+++ b/HierarchicalListView.st Wed Oct 09 16:30:06 2002 +0200
@@ -1159,23 +1159,26 @@
^ image
!
-heightOfLineAt:aLineNr
- "returns the total height for a line at an index, including
- lineSpacing, the figure and the label
+heightOfItem:anItem
+ "returns the height of an item excluding lineSpacing ...
"
- |item icon height|
+ |image height|
- item := list at:aLineNr ifAbsent:nil.
- item isNil ifTrue:[^ 4].
+ height := anItem heightOn:self.
+ image := self figureFor:anItem.
- height := item heightOn:self.
+ image ifNotNil:[
+ height := image height max:height.
+ ].
- (icon := self figureFor:item) notNil ifTrue:[
- height := (icon heightOn:self) max:height.
- ].
- ^ lineSpacing + height
-
-
+ hasConstantHeight ifTrue:[
+ icons size ~~ 0 ifTrue:[
+ icons do:[:anIcon| height := anIcon height max:height ]
+ ] ifFalse:[
+ image ifNil:[ height := height max:16 ]
+ ]
+ ].
+ ^ height
!
indicatorLineAtX:x y:y
@@ -1413,5 +1416,5 @@
!HierarchicalListView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalListView.st,v 1.51 2002-10-01 07:40:23 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/HierarchicalListView.st,v 1.52 2002-10-09 14:30:06 ca Exp $'
! !