#BUGFIX
authorClaus Gittinger <cg@exept.de>
Thu, 08 Oct 2015 09:05:35 +0200
changeset 5473 5723b596e1cf
parent 5471 dadc66355380
child 5474 72868017b4f4
child 5475 f7082f92390c
#BUGFIX class: VariablePanel class definition comment/format in: #orientation: changed:6 methods
VariablePanel.st
--- a/VariablePanel.st	Wed Oct 07 19:33:26 2015 +0200
+++ b/VariablePanel.st	Thu Oct 08 09:05:35 2015 +0200
@@ -1114,7 +1114,7 @@
 !
 
 orientation:aSymbol
-    "change  my orientation; aSymbol must be one of #horizontal or #vertical.
+    "change my orientation; aSymbol must be one of #horizontal or #vertical.
      Changing implies a resize of my subViews."
 
     aSymbol ~~ orientation ifTrue:[
@@ -1173,14 +1173,19 @@
 setBarHeight:nPixel
     "check whether snap matches to extent of bar otherwise disable snap"
 
+    |newBarHeight|
+    
     snapAdornment notNil ifTrue:[
-        barHeight := nPixel max:(snapAdornment height ? 0)
+        newBarHeight := nPixel max:(snapAdornment height ? 0)
     ] ifFalse:[
-        barHeight := nPixel max:0
+        newBarHeight := nPixel max:0
     ].
-
-    realized ifTrue:[
-        self resizeSubviews
+    newBarHeight := newBarHeight max:(styleSheet at:#'variablePanel.minBarHeight' default:newBarHeight).
+    newBarHeight ~= barHeight ifTrue:[
+        barHeight := newBarHeight.
+        realized ifTrue:[
+            self resizeSubviews
+        ]
     ]
 
     "Modified: / 31-10-2010 / 13:00:06 / cg"
@@ -1296,6 +1301,10 @@
 
         oldHeight ~~ barHeight ifTrue:[
             "must recompute subViews"
+"/            realized ifFalse:[
+"/                needResize := true.
+"/                ^ self.
+"/            ].
             self setupSubviews.
             self resizeSubviews.
         ]
@@ -1990,6 +1999,8 @@
             barWidth := (1.5 * mm) rounded. "motif style width"
         ].
     ].
+    barWidth := styleSheet at:#'variablePanel.barWidth' default:barWidth.
+    
     self computeBarHeight.
 
     handleStyle == #mswindows ifTrue:[
@@ -2004,6 +2015,7 @@
     super initialize.
     self bitGravity:nil.
 
+    
     "Modified: / 29.7.1998 / 16:07:23 / cg"
 ! !