--- a/DataSetColumn.st Sun Nov 02 19:28:49 1997 +0100
+++ b/DataSetColumn.st Mon Nov 03 14:14:14 1997 +0100
@@ -257,7 +257,7 @@
drawFrom:start to:stop yTop:yTop yBot:yBot with:fgColor and:bgColor
"redraw rows between start and stop
"
- |lgCol dkCol isLast fg bg selRowNr selRowY label drawColSep n
+ |lgCol dkCol isLast fg bg selRowNr label drawColSep n
rowHeight "{ Class:SmallInteger }"
nTimes "{ Class:SmallInteger }"
y "{ Class:SmallInteger }"
@@ -266,50 +266,35 @@
rowHeight := dataSet rowHeight.
nTimes := stop - start + 1.
- backgroundColor notNil ifTrue:[
- bg := backgroundColor.
+ (bg := backgroundColor) isNil ifTrue:[
+ bg := bgColor
+ ] ifFalse:[
dataSet paint:bg.
-
- dataSet fillRectangleX:0 y:yTop
- width:width
- height:(stop - start + 1 * rowHeight).
-
- dataSet paint:bg.
- ] ifFalse:[
- bg := bgColor
+ dataSet fillRectangleX:0 y:yTop width:width height:(nTimes * rowHeight)
].
- foregroundColor isNil ifTrue:[fg := fgColor]
- ifFalse:[fg := foregroundColor].
-
- y := yTop + textInset.
- x := dataSet horizontalSpacing.
+ fg := foregroundColor ? fgColor.
+ y := yTop + textInset.
+ x := dataSet horizontalSpacing.
selRowNr := dataSet selectedRowIndexInColumn:self.
(selRowNr between:start and:stop) ifTrue:[
- selRowY := selRowNr - 1 * rowHeight.
+ n := selRowNr - 1 * rowHeight.
- dataSet paint:(dataSet hgLgBgColor).
- dataSet fillRectangleX:1
- y:selRowY
- width:width - 1
- height:rowHeight - 1.
-
- selRowY := selRowY + textInset.
-
- dataSet paint:(dataSet hgLgFgColor) on:(dataSet hgLgBgColor).
+ dataSet paint:(lgCol := dataSet hgLgBgColor).
+ dataSet fillRectangleX:1 y:n width:width - 1 height:rowHeight - 1.
+ n := n + textInset.
+ dataSet paint:(dataSet hgLgFgColor) on:lgCol.
drawableAction notNil ifTrue:[
(label := drawableAction value:selRowNr) notNil ifTrue:[
- label displayOn:dataSet x:x y:selRowY
+ label displayOn:dataSet x:x y:n
]
] ifFalse:[
description rendererType == #rowSelector ifTrue:[
- form2 displayOn:dataSet x:x y:selRowY
+ form2 displayOn:dataSet x:x y:n
]
]
- ] ifFalse:[
- selRowY := nil
].
dataSet paint:fg on:bg.
@@ -353,7 +338,7 @@
].
dataSet has3Dsepartors ifFalse:[
- dataSet paint:fg.
+ dataSet paint:fgColor.
drawColSep ifTrue:[
dataSet displayLineFromX:width y:yTop toX:width y:yBot.
@@ -690,5 +675,5 @@
!DataSetColumn class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/DataSetColumn.st,v 1.7 1997-10-30 15:50:43 ca Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/DataSetColumn.st,v 1.8 1997-11-03 13:14:14 ca Exp $'
! !