class: ListView
changed: #widthOfContents
removed leftover obfuscating code debris
--- a/ListView.st Tue Sep 03 16:35:16 2013 +0200
+++ b/ListView.st Tue Sep 03 21:24:27 2013 +0200
@@ -3315,23 +3315,19 @@
max := max max:(lengthOfLongestString * fontWidth)
].
] ifFalse:[
- false "fontIsFixedWidth" ifTrue:[
- max := self lengthOfLongestLine * fontWidth
- ] ifFalse:[
- max := lengthOfLongestLine := 0.
- list notNil ifTrue:[
- list do:[:line |
- |len|
-
- line notNil ifTrue:[
- len := line size.
- lengthOfLongestLine := lengthOfLongestLine max:len.
- len > (lengthOfLongestLine // 3) ifTrue:[
- max := max max:(line widthOn:self)
- ].
- ]
- ].
- "/ max := max max:(f widthOf:list)
+ max := lengthOfLongestLine := 0.
+ list notNil ifTrue:[
+ list do:[:line |
+ |len|
+
+ line notNil ifTrue:[
+ len := line size.
+ "/ consider this a speed hack (not exact, but fast)
+ lengthOfLongestLine := lengthOfLongestLine max:len.
+ len > (lengthOfLongestLine // 3) ifTrue:[
+ max := max max:(line widthOn:self)
+ ].
+ ]
].
].
].
@@ -4930,10 +4926,10 @@
!ListView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.376 2013-08-31 19:30:56 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.377 2013-09-03 19:24:27 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.376 2013-08-31 19:30:56 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.377 2013-09-03 19:24:27 cg Exp $'
! !