--- a/ScrollBar.st Sat Apr 02 17:05:37 2016 +0200
+++ b/ScrollBar.st Sat Apr 02 17:05:57 2016 +0200
@@ -752,7 +752,7 @@
createElements
"private: create my elements"
- (self graphicsDevice supportsNativeWidgetType:#Scrollbar) ifTrue:[
+ (device supportsNativeWidgetType:#Scrollbar) ifTrue:[
"/ native widget contains all I need.
"/ but I need a thumb from the model
thumb := Scroller new.
@@ -837,7 +837,7 @@
style := styleSheet name.
((style = #iris) and:[Screen current hasGrayscales]) ifTrue:[
"have to change some of Buttons defaults"
- clr := (Color gray:25) onDevice:self graphicsDevice.
+ clr := (Color gray:25) onDevice:device.
button1 passiveLevel:2.
button2 passiveLevel:2.
button1 foregroundColor:clr.
@@ -862,7 +862,7 @@
button2 backgroundColor:clr.
button1 activeBackgroundColor:clr.
button2 activeBackgroundColor:clr.
- self graphicsDevice hasGrayscales ifFalse:[
+ device hasGrayscales ifFalse:[
button1 activeForegroundColor:self blackColor.
button2 activeForegroundColor:self blackColor.
]
@@ -928,7 +928,7 @@
^ self
].
(buttonLayout == #bottom) ifTrue:[
- self graphicsDevice supportsViewGravity ifTrue:[
+ device supportsViewGravity ifTrue:[
button1 viewGravity:#South.
button2 viewGravity:#South.
thumb viewGravity:#North.
@@ -988,17 +988,17 @@
self isNativeWidget ifTrue:[
(id := self drawableId) notNil ifTrue:[
- self graphicsDevice
+ device
setScrollRange:0 to:100
redraw:false
in:id.
- self graphicsDevice
+ device
setScrollPosition:thumb thumbOrigin rounded
redraw:false
in:id.
- self graphicsDevice
+ device
setScrollBarPageSize:thumb thumbHeight rounded
redraw:true
in:id.
@@ -1063,7 +1063,7 @@
ena := #DISABLE_BOTH.
]
].
- self graphicsDevice enableScrollBar:ena in:self drawableId.
+ device enableScrollBar:ena in:self drawableId.
].
].
@@ -1148,11 +1148,11 @@
style := styleSheet name.
orientation == #horizontal ifTrue:[
- form1 := ArrowButton leftArrowButtonForm:style on:self graphicsDevice.
- form2 := ArrowButton rightArrowButtonForm:style on:self graphicsDevice.
+ form1 := ArrowButton leftArrowButtonForm:style on:device.
+ form2 := ArrowButton rightArrowButtonForm:style on:device.
] ifFalse:[
- form1 := ArrowButton upArrowButtonForm:style on:self graphicsDevice.
- form2 := ArrowButton downArrowButtonForm:style on:self graphicsDevice.
+ form1 := ArrowButton upArrowButtonForm:style on:device.
+ form2 := ArrowButton downArrowButtonForm:style on:device.
].
form1 isNil ifTrue:[
height1 := width1 := 16.