VariablePanel.st
changeset 5471 dadc66355380
parent 5465 04d76a5e92aa
child 5473 5723b596e1cf
--- a/VariablePanel.st	Wed Oct 07 01:46:00 2015 +0200
+++ b/VariablePanel.st	Wed Oct 07 19:33:26 2015 +0200
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 1991 by Claus Gittinger
 	      All Rights Reserved
@@ -20,7 +18,7 @@
 		showHandle showHandleWhenEntered handlePosition handleColor
 		handleStyle handleLevel noColor trackLine redrawLocked
 		orientation handleLabels knobHeight realRelativeSizes
-		snapAdornment needResize'
+		snapAdornment'
 	classVariableNames:'DefaultShowHandle DefaultHandleStyle DefaultHandlePosition
 		DefaultTrackingLine DefaultSeparatingLine DefaultHandleColor
 		DefaultHandleLevel DefaultVCursor DefaultHCursor
@@ -1180,7 +1178,7 @@
     ] ifFalse:[
         barHeight := nPixel max:0
     ].
-    barHeight := barHeight max:(styleSheet at:#'variablePanel.minBarHeight' default:barHeight).
+
     realized ifTrue:[
         self resizeSubviews
     ]
@@ -1298,10 +1296,6 @@
 
         oldHeight ~~ barHeight ifTrue:[
             "must recompute subViews"
-            realized ifFalse:[
-                needResize := true.
-                ^ self.
-            ].
             self setupSubviews.
             self resizeSubviews.
         ]
@@ -1409,10 +1403,10 @@
                     y := hy + (barHeightInt // 2).   "/ center of the bar
 
                     separatingLine ifTrue:[
-                        self paint:self shadowColor.
+                        self paint:shadowColor.
                         self displayLineFromX:mar y:y toX:(width - mar) y:y.
                         y := y + 1.
-                        self paint:self lightColor.
+                        self paint:lightColor.
                         self displayLineFromX:mar y:y toX:(width - mar) y:y.
                         self paint:viewBackground.
                     ].
@@ -1608,11 +1602,11 @@
     "draw a handles bitmap at hx/hy"
 
     shadowForm notNil ifTrue:[
-        self paint:self shadowColor.
+        self paint:shadowColor.
         self displayForm:shadowForm x:hx y:hy.
     ].
     lightForm notNil ifTrue:[
-        self paint:self lightColor.
+        self paint:lightColor.
         self displayForm:lightForm x:hx y:hy.
     ].
     self paint:viewBackground
@@ -1996,8 +1990,6 @@
             barWidth := (1.5 * mm) rounded. "motif style width"
         ].
     ].
-    barWidth := styleSheet at:#'variablePanel.barWidth' default:barWidth.
-    
     self computeBarHeight.
 
     handleStyle == #mswindows ifTrue:[
@@ -2011,8 +2003,7 @@
     orientation isNil ifTrue:[orientation := #vertical].
     super initialize.
     self bitGravity:nil.
-    needResize := true.
-    
+
     "Modified: / 29.7.1998 / 16:07:23 / cg"
 ! !
 
@@ -2537,7 +2528,7 @@
 
 realize
     super realize.
-    (needResize or:[self anyNonRelativeSubviews]) ifTrue:[
+    self anyNonRelativeSubviews ifTrue:[
         self setupSubviews.
         self sizeChanged:nil.   "/ force recomputation of subviews
     ].