checkin from browser
authorClaus Gittinger <cg@exept.de>
Sat, 28 Aug 1999 16:10:08 +0200
changeset 1490 9c418c3aaf49
parent 1489 d4c9639f7786
child 1491 d6133cb2f3c9
checkin from browser
DSVColumnView.st
DataSetColumn.st
--- a/DSVColumnView.st	Fri Aug 27 17:34:38 1999 +0200
+++ b/DSVColumnView.st	Sat Aug 28 16:10:08 1999 +0200
@@ -2187,6 +2187,11 @@
             buttonHalfShadowColor := buttonShadowColor lightened
         ]
     ].
+
+    buttonHalfShadowColor isNil ifTrue:[
+        buttonHalfShadowColor := Color gray
+    ].
+
     rowSelectorForm         := self class rowSelector.
     checkToggleActiveImage  := CheckToggleActiveImage.
     checkTogglePassiveImage := CheckTogglePassiveImage.
@@ -2378,7 +2383,7 @@
 
         self hasSelection ifTrue:[
             editView notNil ifTrue:[
-                editView width:(self selectedColumn width - separatorSize).
+                editView width:(self selectedColumn width - (2 * separatorSize)).
             ].
             self scrollToSelection.
         ].
@@ -3179,5 +3184,5 @@
 !DSVColumnView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/DSVColumnView.st,v 1.84 1999-08-24 15:28:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/DSVColumnView.st,v 1.85 1999-08-28 14:10:08 cg Exp $'
 ! !
--- a/DataSetColumn.st	Fri Aug 27 17:34:38 1999 +0200
+++ b/DataSetColumn.st	Sat Aug 28 16:10:08 1999 +0200
@@ -18,7 +18,7 @@
 		rendererType backgroundColor rowSeparatorSelector
 		showColSeparator showRowSeparator foregroundColor fgSelector
 		bgSelector columnAlignment label readSelector
-		numArgsToReadSelector columnAdaptor'
+		numArgsToReadSelector columnAdaptor descWidth descMinWidth'
 	classVariableNames:''
 	poolDictionaries:''
 	category:'Views-DataSet'
@@ -185,12 +185,21 @@
 !DataSetColumn methodsFor:'accessing dimension'!
 
 minWidth
-    "get my minimum width required by the column
+    "get the minimum width required by the column
     "
-    |width|
+    descMinWidth notNil ifTrue:[
+        ^ descMinWidth
+    ].
+    width := nil.
+  ^ self width
 
-    width := description minWidth.
-  ^ width == 0 ifTrue:[self width] ifFalse:[width]
+!
+
+setDescWidth:aWidth
+    "set a fixed width
+    "
+    descWidth    := aWidth max:(4 + label preferredWidth).
+    descMinWidth := width := descWidth.
 
 
 !
@@ -202,12 +211,16 @@
 
     width notNil ifTrue:[^ width].              "/ already computed
 
-    (width := description width) isReal ifTrue:[
-        width := (width * dataSet width) rounded.
+    descMinWidth notNil ifTrue:[
+        width := descMinWidth.
+      ^ width
     ].
 
-    (width := width max:(description minWidth)) ~~ 0 ifTrue:[
-        ^ width
+    width := description minWidth max:(label preferredWidth).
+
+    descWidth isReal ifTrue:[
+        width := width max:(descWidth * dataSet width) rounded.
+      ^ width
     ].
 
     self containsText ifTrue:[
@@ -223,21 +236,11 @@
             width := width + (dataSet font widthOn:dataSet device)
         ].
     ].
-    width := width + buttonExtent x.
-
-    label notNil ifTrue:[
-        width := width max:(4 + label preferredWidth)
-    ].
-    ^ width := width + dataSet separatorSize + (2 * dataSet horizontalSpacing).
+    width := width + buttonExtent x + dataSet separatorSize + (2 * dataSet horizontalSpacing).
+    descMinWidth := width.
+  ^ width
 
 
-!
-
-width:aWidth
-    "set the width
-    "
-    width := aWidth max:(description minWidth)
-
 ! !
 
 !DataSetColumn methodsFor:'drawing'!
@@ -568,6 +571,7 @@
 
     description      := aDescription.
     rendererType     := description rendererType.
+    descWidth        := description width.
     width            := nil.
     device           := dataSet device.
     shownValue       := [:aRow| nil ].
@@ -863,5 +867,5 @@
 !DataSetColumn class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/DataSetColumn.st,v 1.46 1999-08-24 15:29:07 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/DataSetColumn.st,v 1.47 1999-08-28 14:09:39 cg Exp $'
 ! !