diff -r 54c3f2cf5276 -r 04d76a5e92aa VariablePanel.st --- a/VariablePanel.st Tue Oct 06 18:26:03 2015 +0200 +++ b/VariablePanel.st Tue Oct 06 22:31:00 2015 +0200 @@ -20,7 +20,7 @@ showHandle showHandleWhenEntered handlePosition handleColor handleStyle handleLevel noColor trackLine redrawLocked orientation handleLabels knobHeight realRelativeSizes - snapAdornment' + snapAdornment needResize' classVariableNames:'DefaultShowHandle DefaultHandleStyle DefaultHandlePosition DefaultTrackingLine DefaultSeparatingLine DefaultHandleColor DefaultHandleLevel DefaultVCursor DefaultHCursor @@ -1180,7 +1180,7 @@ ] ifFalse:[ barHeight := nPixel max:0 ]. - + barHeight := barHeight max:(styleSheet at:#'variablePanel.minBarHeight' default:barHeight). realized ifTrue:[ self resizeSubviews ] @@ -1298,6 +1298,10 @@ oldHeight ~~ barHeight ifTrue:[ "must recompute subViews" + realized ifFalse:[ + needResize := true. + ^ self. + ]. self setupSubviews. self resizeSubviews. ] @@ -1405,10 +1409,10 @@ y := hy + (barHeightInt // 2). "/ center of the bar separatingLine ifTrue:[ - self paint:shadowColor. + self paint:self shadowColor. self displayLineFromX:mar y:y toX:(width - mar) y:y. y := y + 1. - self paint:lightColor. + self paint:self lightColor. self displayLineFromX:mar y:y toX:(width - mar) y:y. self paint:viewBackground. ]. @@ -1604,11 +1608,11 @@ "draw a handles bitmap at hx/hy" shadowForm notNil ifTrue:[ - self paint:shadowColor. + self paint:self shadowColor. self displayForm:shadowForm x:hx y:hy. ]. lightForm notNil ifTrue:[ - self paint:lightColor. + self paint:self lightColor. self displayForm:lightForm x:hx y:hy. ]. self paint:viewBackground @@ -1992,6 +1996,8 @@ barWidth := (1.5 * mm) rounded. "motif style width" ]. ]. + barWidth := styleSheet at:#'variablePanel.barWidth' default:barWidth. + self computeBarHeight. handleStyle == #mswindows ifTrue:[ @@ -2005,7 +2011,8 @@ orientation isNil ifTrue:[orientation := #vertical]. super initialize. self bitGravity:nil. - + needResize := true. + "Modified: / 29.7.1998 / 16:07:23 / cg" ! ! @@ -2530,7 +2537,7 @@ realize super realize. - self anyNonRelativeSubviews ifTrue:[ + (needResize or:[self anyNonRelativeSubviews]) ifTrue:[ self setupSubviews. self sizeChanged:nil. "/ force recomputation of subviews ]. @@ -2676,10 +2683,10 @@ !VariablePanel class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libwidg/VariablePanel.st,v 1.106 2015-05-11 15:04:17 cg Exp $' + ^ '$Header$' ! version_CVS - ^ '$Header: /cvs/stx/stx/libwidg/VariablePanel.st,v 1.106 2015-05-11 15:04:17 cg Exp $' + ^ '$Header$' ! !