VarPanel.st
changeset 1550 f0297a144983
parent 1529 509edab0a08b
child 1551 1b9a8a925fe7
equal deleted inserted replaced
1549:b64b2dd7d5df 1550:f0297a144983
  1168 
  1168 
  1169 computeBarHeight
  1169 computeBarHeight
  1170     "compute the height if the separating bar from either the
  1170     "compute the height if the separating bar from either the
  1171      form or an explicit height given in the styleSheet"
  1171      form or an explicit height given in the styleSheet"
  1172 
  1172 
  1173     <resource: #style (#'variablePanel.barHeight')>
  1173     <resource: #style (#'variablePanel.barHeight'
       
  1174                        #'variablePanel.barHeightMM')>
  1174 
  1175 
  1175     |bH h|
  1176     |bH h|
  1176 
  1177 
  1177     shadowForm notNil ifTrue:[
  1178     shadowForm notNil ifTrue:[
  1178         bH := shadowForm height + 2.
  1179         bH := shadowForm height + 2.
  1179     ] ifFalse:[
  1180     ] ifFalse:[
  1180         self is3D ifTrue:[
       
  1181             h := 2
       
  1182         ] ifFalse:[
       
  1183             h := 2
       
  1184         ].
       
  1185         bH := styleSheet at:'variablePanel.barHeight'.
  1181         bH := styleSheet at:'variablePanel.barHeight'.
  1186         bH isNil ifTrue:[
  1182         bH isNil ifTrue:[
  1187             h := styleSheet at:'variablePanel.barHeightMM' default:h.
  1183             h := styleSheet at:'variablePanel.barHeightMM' default:2.
  1188             bH := (h * device verticalPixelPerMillimeter) rounded.
  1184             bH := (h * device verticalPixelPerMillimeter) rounded.
  1189         ].
  1185         ].
  1190     ].
  1186     ].
  1191     self barHeight:bH.
  1187     self barHeight:bH.
  1192     knobHeight := bH.
  1188     knobHeight := bH.
  1431                 ] ifFalse:[
  1427                 ] ifFalse:[
  1432                     newExt x:(newExt x - o2 - o1)
  1428                     newExt x:(newExt x - o2 - o1)
  1433                 ]
  1429                 ]
  1434             ].
  1430             ].
  1435             view pixelOrigin:newOrg extent:newExt.
  1431             view pixelOrigin:newOrg extent:newExt.
  1436         ]
  1432         ].
       
  1433         "/ must clear, since handles are copied automatically (by bitGravity)
       
  1434         self clear.
       
  1435         self invalidate.
  1437     ]
  1436     ]
  1438 
  1437 
  1439     "Modified: 28.1.1997 / 17:55:03 / cg"
  1438     "Modified: 28.1.1997 / 17:55:03 / cg"
  1440     "Modified: 22.3.1997 / 01:02:21 / stefan"
  1439     "Modified: 22.3.1997 / 01:02:21 / stefan"
  1441 !
  1440 !
  1528 ! !
  1527 ! !
  1529 
  1528 
  1530 !VariablePanel class methodsFor:'documentation'!
  1529 !VariablePanel class methodsFor:'documentation'!
  1531 
  1530 
  1532 version
  1531 version
  1533     ^ '$Header: /cvs/stx/stx/libwidg/Attic/VarPanel.st,v 1.39 1998-05-19 14:21:49 cg Exp $'
  1532     ^ '$Header: /cvs/stx/stx/libwidg/Attic/VarPanel.st,v 1.40 1998-06-04 16:41:02 cg Exp $'
  1534 ! !
  1533 ! !