--- a/VariablePanel.st Tue Feb 18 17:59:47 2014 +0100
+++ b/VariablePanel.st Tue Feb 18 18:16:37 2014 +0100
@@ -754,7 +754,7 @@
].
DefaultSeparatingLine := StyleSheet at:#'variablePanel.separatingLine' default:false.
- DefaultHandleColor := StyleSheet colorAt:#'variablePanel.handleColor' default:Black.
+ DefaultHandleColor := StyleSheet colorAt:#'variablePanel.handleColor' default:Color black.
DefaultHandleImage := StyleSheet at:#'variablePanel.handleImage'
@@ -1013,8 +1013,8 @@
(styleSymbol ~~ handleStyle) ifTrue:[
handleStyle := styleSymbol.
handleStyle == #next ifTrue:[
- shadowForm := self class shadowFormOn:device.
- lightForm := self class lightFormOn:device.
+ shadowForm := self class shadowFormOn:self graphicsDevice.
+ lightForm := self class lightFormOn:self graphicsDevice.
] ifFalse:[
shadowForm := lightForm := nil
].
@@ -1664,7 +1664,7 @@
self lineStyle:#dashed.
] ifFalse:[
trackLine == #dottedLine ifTrue:[
- oldStyle := lineStyle.
+ oldStyle := gc lineStyle.
self lineStyle:#dotted.
]
].
@@ -1823,7 +1823,7 @@
<resource: #style (#'variablePanel.barHeight'
#'variablePanel.barHeightMM')>
- |bH h lvl|
+ |bH h lvl currentDeviceFont|
shadowForm notNil ifTrue:[
bH := shadowForm height + 2.
@@ -1831,7 +1831,7 @@
bH := styleSheet at:#'variablePanel.barHeight'.
bH isNil ifTrue:[
h := styleSheet at:#'variablePanel.barHeightMM' default:2.
- bH := (h * device verticalPixelPerMillimeter) rounded.
+ bH := (h * self graphicsDevice verticalPixelPerMillimeter) rounded.
].
].
lvl := styleSheet at:#'variablePanel.barLevel' default:0.
@@ -1843,7 +1843,7 @@
knobHeight := bH.
handleLabels notNil ifTrue:[
- font := font onDevice:device.
+ currentDeviceFont := gc createFontOnDevice.
bH := handleLabels inject:bH into:[:maxSoFar :thisLabel |
thisLabel isNil ifTrue:[
maxSoFar
@@ -1851,7 +1851,7 @@
maxSoFar max:(thisLabel heightOn:self)
]
].
- bH := bH + font descent - 1
+ bH := bH + currentDeviceFont descent - 1
].
self barHeight:bH.
@@ -1868,7 +1868,7 @@
cursor := self class
cursorForOrientation:orientation
- onDevice:device
+ onDevice:self graphicsDevice
"Modified: / 30.9.1998 / 18:20:35 / cg"
!
@@ -1880,7 +1880,7 @@
super initStyle.
- handleColor := DefaultHandleColor onDevice:device.
+ handleColor := DefaultHandleColor onDevice:self graphicsDevice.
DefaultHandleStyle isNil ifTrue:[
handleStyle := styleSheet name
@@ -1897,21 +1897,21 @@
separatingLine := DefaultSeparatingLine.
DefaultHandleImage notNil ifTrue:[
- shadowForm := DefaultHandleImage onDevice:device.
+ shadowForm := DefaultHandleImage onDevice:self graphicsDevice.
barWidth := shadowForm width.
] ifFalse:[
handleStyle == #next ifTrue:[
DefaultHandleImage notNil ifTrue:[
- shadowForm := DefaultHandleImage onDevice:device.
+ shadowForm := DefaultHandleImage onDevice:self graphicsDevice.
] ifFalse:[
- shadowForm := self class shadowFormOn:device.
- lightForm := self class lightFormOn:device.
+ shadowForm := self class shadowFormOn:self graphicsDevice.
+ lightForm := self class lightFormOn:self graphicsDevice.
].
barWidth := shadowForm width.
] ifFalse:[
shadowForm := lightForm := nil.
- mm := device verticalPixelPerMillimeter.
+ mm := self graphicsDevice verticalPixelPerMillimeter.
barWidth := (1.5 * mm) rounded. "motif style width"
].
].
@@ -2320,21 +2320,21 @@
colorAt:#'variablePanel.snapSelectedBgColor'
default:(StyleSheet colorAt:#'button.activeBackgroundColor').
color notNil ifTrue:[
- snapAdornment selectedBgColor:(color onDevice:device)
+ snapAdornment selectedBgColor:(color onDevice:self graphicsDevice)
].
color := StyleSheet
colorAt:#'variablePanel.snapEnterBgColor'
default:(StyleSheet colorAt:#'button.enteredBackgroundColor').
color notNil ifTrue:[
- snapAdornment enterBgColor:(color onDevice:device)
+ snapAdornment enterBgColor:(color onDevice:self graphicsDevice)
].
self class snapIcons keysAndValuesDo:[:aKey :anIcon|
- anIcon device == device ifTrue:[
+ anIcon device == self graphicsDevice ifTrue:[
icon := anIcon
] ifFalse:[
- icon := anIcon copy onDevice:device.
+ icon := anIcon copy onDevice:self graphicsDevice.
icon clearMaskedPixels.
device == Display ifTrue:[
self class snapIcons at:aKey put:icon.
@@ -2599,10 +2599,10 @@
!VariablePanel class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/VariablePanel.st,v 1.97 2014-01-16 14:33:02 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/VariablePanel.st,v 1.98 2014-02-18 17:16:37 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg/VariablePanel.st,v 1.97 2014-01-16 14:33:02 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/VariablePanel.st,v 1.98 2014-02-18 17:16:37 stefan Exp $'
! !