#BUGFIX by cg
class: DSVColumnView
changed:
#computeRowHeight
#initialize
#preferredExtent
--- a/DSVColumnView.st Wed Sep 13 15:49:47 2017 +0200
+++ b/DSVColumnView.st Wed Sep 13 16:17:37 2017 +0200
@@ -3407,6 +3407,9 @@
|fontOnDevice|
+ verticalSpacing := verticalSpacing ? self class verticalSpacing.
+ horizontalSpacing := horizontalSpacing ? self class horizontalSpacing.
+
super initialize.
self lineWidth:0.
@@ -3451,8 +3454,7 @@
"/ need for active help
self enableMotionEvents.
- "Modified: / 22-10-2006 / 11:02:25 / cg"
- "Modified (format): / 13-09-2017 / 15:34:43 / cg"
+ "Modified: / 13-09-2017 / 16:08:34 / cg"
!
mapped
@@ -3879,11 +3881,18 @@
computeRowHeight
|minHeight|
- minHeight := (self font height).
+ minHeight := self font height.
columnDescriptors do:[:aCol |
minHeight := (aCol heightOfHighestRow) max:minHeight.
].
+
+ "/ to fix a double bug which compensated for not computing things correctly
+ "/ (verticalSpacing was always computed as 2 intothe height, even if changed later,
+ "/ it was stil in the max-of-col-heights, because minHeight was never reset, but always
+ "/ carried on in the minRowHeight)
+ minHeight := 2 + minHeight + 2.
+
rowHeight := (verticalSpacing + minHeight + verticalSpacing + separatorSize).
minRowHeight := rowHeight.
@@ -3923,13 +3932,12 @@
numRows := list size.
"/ no need for a separator after the last row.
- prefHeight := (numRows * rowHeight) - separatorSize.
- prefHeight := "(self preferredLabelViewHeight) +" separatorSize + prefHeight + separatorSize.
+ prefHeight := separatorSize + ((numRows * rowHeight) "- separatorSize") "+ separatorSize".
cachedPreferredExtent := prefWidth @ prefHeight.
^ cachedPreferredExtent
- "Modified: / 13-09-2017 / 15:33:13 / cg"
+ "Modified: / 13-09-2017 / 15:53:27 / cg"
!
preferredExtentChanged