device access
authorClaus Gittinger <cg@exept.de>
Sat, 02 Apr 2016 17:09:32 +0200
changeset 5632 bacbc9c526b2
parent 5631 d5c75a9c8543
child 5633 5ce074a3f531
device access
VariablePanel.st
--- a/VariablePanel.st	Sat Apr 02 17:09:02 2016 +0200
+++ b/VariablePanel.st	Sat Apr 02 17:09:32 2016 +0200
@@ -1083,8 +1083,8 @@
     (styleSymbol ~~ handleStyle) ifTrue:[
         handleStyle := styleSymbol.
         handleStyle == #next ifTrue:[
-            shadowForm := self class shadowFormOn:self graphicsDevice.
-            lightForm := self class lightFormOn:self graphicsDevice.
+            shadowForm := self class shadowFormOn:device.
+            lightForm := self class lightFormOn:device.
         ] ifFalse:[
             shadowForm := lightForm := nil
         ].
@@ -1920,7 +1920,7 @@
         bH := styleSheet at:#'variablePanel.barHeight'.
         bH isNil ifTrue:[
             h := styleSheet at:#'variablePanel.barHeightMM' default:2.
-            bH := (h * self graphicsDevice verticalPixelPerMillimeter) rounded.
+            bH := (h * device verticalPixelPerMillimeter) rounded.
         ].
     ].
     lvl := styleSheet at:#'variablePanel.barLevel' default:0.
@@ -1957,7 +1957,7 @@
 
     cursor := self class 
                 cursorForOrientation:orientation
-                onDevice:self graphicsDevice
+                onDevice:device
 
     "Modified: / 30.9.1998 / 18:20:35 / cg"
 !
@@ -1969,7 +1969,7 @@
 
     super initStyle.
 
-    handleColor := DefaultHandleColor onDevice:self graphicsDevice.
+    handleColor := DefaultHandleColor onDevice:device.
 
     DefaultHandleStyle isNil ifTrue:[
         handleStyle := styleSheet name
@@ -1986,21 +1986,21 @@
     separatingLine := DefaultSeparatingLine.
 
     DefaultHandleImage notNil ifTrue:[
-        shadowForm := DefaultHandleImage onDevice:self graphicsDevice.
+        shadowForm := DefaultHandleImage onDevice:device.
         barWidth := shadowForm width.
     ] ifFalse:[
         handleStyle == #next ifTrue:[
             DefaultHandleImage notNil ifTrue:[
-                shadowForm := DefaultHandleImage onDevice:self graphicsDevice.
+                shadowForm := DefaultHandleImage onDevice:device.
             ] ifFalse:[
-                shadowForm := self class shadowFormOn:self graphicsDevice.
-                lightForm := self class lightFormOn:self graphicsDevice.
+                shadowForm := self class shadowFormOn:device.
+                lightForm := self class lightFormOn:device.
             ].
             barWidth := shadowForm width.
         ] ifFalse:[
             shadowForm := lightForm := nil.
 
-            mm := self graphicsDevice verticalPixelPerMillimeter.
+            mm := device verticalPixelPerMillimeter.
             barWidth := (1.5 * mm) rounded. "motif style width"
         ].
     ].
@@ -2424,22 +2424,22 @@
                     colorAt:#'variablePanel.snapSelectedBgColor'
                     default:(StyleSheet colorAt:#'button.activeBackgroundColor').
         color notNil ifTrue:[
-            snapAdornment selectedBgColor:(color onDevice:self graphicsDevice)
+            snapAdornment selectedBgColor:(color onDevice:device)
         ].
 
         color := StyleSheet 
                     colorAt:#'variablePanel.snapEnterBgColor'
                     default:(StyleSheet colorAt:#'button.enteredBackgroundColor').
         color notNil ifTrue:[
-            snapAdornment enterBgColor:(color onDevice:self graphicsDevice)
+            snapAdornment enterBgColor:(color onDevice:device)
         ].
 
         self class snapIcons keysAndValuesDo:[:aKey :anIcon|
-            anIcon device == self graphicsDevice ifTrue:[
+            anIcon device == device ifTrue:[
                 icon := anIcon
             ] ifFalse:[
-                icon := anIcon copy onDevice:self graphicsDevice.
-                self graphicsDevice == Display ifTrue:[
+                icon := anIcon copy onDevice:device.
+                device == Display ifTrue:[
                     self class snapIcons at:aKey put:icon.
                 ]
             ].