#BUGFIX by ca
authorca
Tue, 25 Jul 2017 08:33:49 +0200
changeset 5561 41db1a6fa309
parent 5560 0e2bba0da0ff
child 5562 5a25c39f1864
#BUGFIX by ca class: DataSetColumn comment/format in: #width D163419 - resize of fonts in DataSetView's
DataSetColumn.st
--- a/DataSetColumn.st	Tue Jul 25 08:32:00 2017 +0200
+++ b/DataSetColumn.st	Tue Jul 25 08:33:49 2017 +0200
@@ -449,68 +449,6 @@
     width := pixels
 !
 
-width
-    "returns the width in pixels
-     Warning:
-        only the first numberOfRowsProbedForColumnSize are probed,
-        in case the access is expensive (dataBase apps)
-     If the descriptor defines a width, that is used, and the items
-     are not probed at all."
-
-    |max       "{ Class:SmallInteger }"
-     listSize  "{ Class:SmallInteger }"|
-
-    width notNil ifTrue:[^ width].              "/ already computed
-
-    descMinWidth notNil ifTrue:[
-        width := descMinWidth.
-        ^ width
-    ].
-
-    (descWidth ~~ 0 and:[self hasRelativeWidth not "descWidth isLimitedPrecisionReal not"]) ifTrue:[
-        width := descMinWidth := descWidth.
-        ^ width
-    ].
-
-    width := description minWidth max:(label preferredWidth).
-
-    self hasRelativeWidth ifTrue:[
-        width := width max:(descWidth * dataSet innerWidth) rounded.
-        ^ width
-    ].
-
-    containsText ifTrue:[
-        "/ take maximum numberOfRowsProbedForColumnSize entries to calculate the width;
-        "/ can be resized later if necessary
-        listSize := dataSet size.
-        max := listSize min:description numberOfRowsProbedForColumnSize.
-
-        max ~~ 0 ifTrue:[
-            1 to:max do:[:rowNr| |row|
-                row := dataSet at:rowNr.
-                width := width max:(self widthOfLabel:(self shownValueForRow:row rowNr:rowNr))
-            ].
-            width := width max:(self widthOfLabel:(self shownValueForRow:(dataSet at:listSize) rowNr:listSize))
-        ].
-        description editorType ~~ #None ifTrue:[
-            width := width + (dataSet font widthOn:dataSet device)
-        ].
-    ] ifFalse:[
-        max := 1
-    ].
-    width := width + buttonExtent x + dataSet separatorSize + (2 * dataSet horizontalSpacing).
-
-    max ~~ 0 ifTrue:[
-        descMinWidth := width.
-        description usePreferredWidth ifTrue:[
-            descWidth := width
-        ]
-    ].
-    ^ width
-
-    "Modified: / 25.2.2000 / 14:29:16 / cg"
-!
-
 width: aWidth
     self setWidth: aWidth