--- a/DSVLabelView.st Thu Aug 22 14:46:46 2002 +0200
+++ b/DSVLabelView.st Thu Aug 22 15:07:36 2002 +0200
@@ -101,6 +101,8 @@
"
"/ |layout|
+ aListOfColumns = columns ifTrue:[self halt].
+
columns := aListOfColumns.
preferredHeight := nil.
selection := nil.
@@ -234,6 +236,9 @@
desc := aCol description.
x0 := x1.
x1 := x1 + aCol width.
+ aKey == columns size ifTrue:[
+ x1 := x1 + 1
+ ].
aKey == selection ifTrue:[
(x1 > x and:[x0 < maxX]) ifTrue:[
@@ -260,7 +265,10 @@
].
x1 < (maxX - absLabelLevel - absLabelLevel - 3) ifTrue:[
- dataSet drawEdgesAtX:x1 y:y0 width:(width-margin-x1-absLabelLevel) height:h level:absLabelLevel on:self
+ dataSet
+ drawEdgesAtX:x1 y:y0
+ width:(width-margin-x1-absLabelLevel) height:h
+ level:absLabelLevel on:self
].
!
@@ -384,9 +392,7 @@
selection isNil ifTrue:[
lineDrag notNil ifTrue:[
(opaqueColumnResize ? (UserPreferences current opaqueTableColumnResizing == true)) ifFalse:[
- lineDrag invertLine.
- ].
- (opaqueColumnResize ? (UserPreferences current opaqueTableColumnResizing == true)) ifFalse:[
+ lineDrag invertLine.
column := lineDrag column.
deltaX := lineDrag deltaX.
@@ -615,5 +621,5 @@
!DSVLabelView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/DSVLabelView.st,v 1.42 2002-08-21 16:25:51 penk Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/DSVLabelView.st,v 1.43 2002-08-22 13:07:36 cg Exp $'
! !
--- a/DataSetView.st Thu Aug 22 14:46:46 2002 +0200
+++ b/DataSetView.st Thu Aug 22 15:07:36 2002 +0200
@@ -271,18 +271,11 @@
!DataSetView methodsFor:'change & update'!
update:something with:aParameter from:changedObject
- changedObject == scrolledView ifTrue:[
- (something == #sizeOfView) ifTrue:[
- self recomputeLabelLayout.
- ].
- ].
changedObject == labelView ifTrue:[
- ((something == #visibility)
- or:[something == #columnLayout]) ifTrue:[
+ (something == #columnLayout) ifTrue:[
self recomputeLayouts.
^ self
].
-
].
super update:something with:aParameter from:changedObject
@@ -305,7 +298,7 @@
columnView := DSVColumnView new.
columnView labelView:labelView.
- columnView addDependent:self.
+ "/ columnView addDependent:self.
labelView addDependent:self.
self scrolledView:columnView.
@@ -313,23 +306,6 @@
!DataSetView methodsFor:'layout computation'!
-recomputeLabelLayout
- |columnView columnViewLayout newLeft newRight|
-
- columnView := self scrolledView.
- columnView isNil ifTrue:[^ self].
- (columnViewLayout := columnView layout) isNil ifTrue:[^ self].
-
- newLeft := columnViewLayout leftOffset.
- newRight := columnViewLayout rightOffset.
- (newLeft ~~ labelView layout leftOffset
- or:[ newRight ~~ labelView layout rightOffset]) ifTrue:[
- labelView layout leftOffset:newLeft.
- labelView layout rightOffset:newRight.
- labelView isVisible ifTrue:[labelView containerChangedSize]
- ].
-!
-
recomputeLayouts
|columnView columnViewLayout newOffset|
@@ -349,21 +325,35 @@
columnView containerChangedSize.
]
].
- labelView containerChangedSize.
+"/ labelView containerChangedSize.
!
scrolledViewLayout:aLayout
"invoked by superclasses setLayout method, whenever the scrolled views
layout changes (due to added/removed scrollbars)."
- |modifiedLayout originalTopOffset|
+ |modifiedLayout originalTopOffset labelViewLayout newLeft newRight|
"/ always copy - since layout it destructively modified in #recomputeLayouts
modifiedLayout := aLayout copy.
labelView isVisible ifTrue:[
originalTopOffset := scrolledViewLayout topOffset.
modifiedLayout topOffset:(originalTopOffset + labelView height).
- labelView layout topOffset:originalTopOffset.
+
+ newLeft := aLayout leftOffset.
+ newRight := aLayout rightOffset.
+ (scrolledView level == 0
+ and:[self level < 0
+ and:[labelView level == 0]]) ifTrue:[
+ newRight := (newRight + 1) min:0
+ ].
+
+ labelViewLayout := labelView layout.
+ labelViewLayout topOffset:originalTopOffset.
+ labelViewLayout
+ leftOffset:newLeft
+ rightOffset:newRight.
+ labelView containerChangedSize.
].
super scrolledViewLayout:modifiedLayout
! !
@@ -379,5 +369,5 @@
!DataSetView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg2/DataSetView.st,v 1.33 2002-08-21 16:25:59 penk Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg2/DataSetView.st,v 1.34 2002-08-22 13:07:29 cg Exp $'
! !