--- a/SelectionInListView.st Tue Feb 18 17:21:26 2014 +0100
+++ b/SelectionInListView.st Tue Feb 18 17:25:39 2014 +0100
@@ -1999,8 +1999,8 @@
itemHeight := item heightOn:self.
].
- (device depth == 1 or:[arrowLevel == 0]) ifTrue:[
- form := self class rightArrowFormOn:device.
+ (self graphicsDevice depth == 1 or:[arrowLevel == 0]) ifTrue:[
+ form := self class rightArrowFormOn:self graphicsDevice.
form notNil ifTrue:[
y := y + ((itemHeight - form height) // 2).
self foreground:(
@@ -2011,11 +2011,11 @@
]
] ifFalse:[
smallArrow ifTrue:[
- form := self class smallRightArrowLightFormOn:device.
- form2 := self class smallRightArrowShadowFormOn:device.
+ form := self class smallRightArrowLightFormOn:self graphicsDevice.
+ form2 := self class smallRightArrowShadowFormOn:self graphicsDevice.
] ifFalse:[
- form := self class rightArrowLightFormOn:device.
- form2 := self class rightArrowShadowFormOn:device.
+ form := self class rightArrowLightFormOn:self graphicsDevice.
+ form2 := self class rightArrowShadowFormOn:self graphicsDevice.
].
(form isNil or:[form2 isNil]) ifTrue:[
"/ very bad conditions
@@ -2083,7 +2083,7 @@
dObj := selectedVisualBlock value:self value:listLine.
self paint:fg on:bg.
- dObj displayOn:self x:(textStartLeft-viewOrigin x) y:y + font ascent opaque:true.
+ dObj displayOn:self x:(textStartLeft-viewOrigin x) y:y + gc font ascent opaque:true.
] ifFalse:[
strikeOut ifTrue:[
self drawVisibleLine:visLineNr with:fgColor and:bgColor.
@@ -2757,16 +2757,19 @@
fetchDeviceResources
"fetch device colors, to avoid reallocation at redraw time"
+ |graphicsDevice|
+
super fetchDeviceResources.
-
- hilightFgColor notNil ifTrue:[hilightFgColor := hilightFgColor onDevice:device].
- hilightBgColor notNil ifTrue:[hilightBgColor := hilightBgColor onDevice:device].
-
- halfIntensityFgColor notNil ifTrue:[halfIntensityFgColor := halfIntensityFgColor onDevice:device].
- hilightFrameColor notNil ifTrue:[hilightFrameColor := hilightFrameColor onDevice:device].
-
- hilightFgColorNoFocus notNil ifTrue:[hilightFgColorNoFocus := hilightFgColorNoFocus onDevice:device].
- hilightBgColorNoFocus notNil ifTrue:[hilightBgColorNoFocus := hilightBgColorNoFocus onDevice:device].
+ graphicsDevice := self graphicsDevice.
+
+ hilightFgColor notNil ifTrue:[hilightFgColor := hilightFgColor onDevice:graphicsDevice].
+ hilightBgColor notNil ifTrue:[hilightBgColor := hilightBgColor onDevice:graphicsDevice].
+
+ halfIntensityFgColor notNil ifTrue:[halfIntensityFgColor := halfIntensityFgColor onDevice:graphicsDevice].
+ hilightFrameColor notNil ifTrue:[hilightFrameColor := hilightFrameColor onDevice:graphicsDevice].
+
+ hilightFgColorNoFocus notNil ifTrue:[hilightFgColorNoFocus := hilightFgColorNoFocus onDevice:graphicsDevice].
+ hilightBgColorNoFocus notNil ifTrue:[hilightBgColorNoFocus := hilightBgColorNoFocus onDevice:graphicsDevice].
!
initCursor
@@ -2787,20 +2790,20 @@
arrowLevel := 1.
smallArrow := false.
- device hasGrayscales ifTrue:[
+ self graphicsDevice hasGrayscales ifTrue:[
"
must get rid of these hard codings
"
(hilightStyle == #next) ifTrue:[
hilightFgColor := fgColor.
- hilightBgColor := White.
+ hilightBgColor := self whiteColor.
hilightFrameColor := fgColor
] ifFalse:[
(hilightStyle == #motif) ifTrue:[
- fgColor := White.
+ fgColor := self whiteColor.
bgColor := Grey.
viewBackground := bgColor.
- hilightFgColor := bgColor "fgColor" "White".
+ hilightFgColor := bgColor "fgColor" "self whiteColor".
hilightBgColor := fgColor "bgColor lightened" "darkened".
] ifFalse:[
(hilightStyle == #openwin) ifTrue:[
@@ -2859,7 +2862,7 @@
#hack.
"/ q&d temporary hack.
"/ X11 fonts are currently so ugly... add more spacing.
- device platformName = #X11 ifTrue:[
+ self graphicsDevice platformName = #X11 ifTrue:[
lineSpacing := lineSpacing + 3.
].
hilightFgColor isNil ifTrue:[
@@ -3380,7 +3383,7 @@
dObj := visualBlock value:self value:listLine.
self paint:fg on:bg.
- dObj displayOn:self x:(textStartLeft - viewOrigin) x y:y + font ascent opaque:true.
+ dObj displayOn:self x:(textStartLeft - viewOrigin) x y:y + gc font ascent opaque:true.
^ self
].
@@ -3390,9 +3393,9 @@
fg := halfIntensityFgColor
].
(self line:listLine hasAttribute:#bold) ifTrue:[
- newFont := font asBold.
- (font bold
- or:[id := (newFont onDevice:device) fontId.
+ newFont := gc font asBold.
+ (gc font bold
+ or:[id := (newFont onDevice:gc device) fontId.
id isNil])
ifTrue:[
"
@@ -3413,7 +3416,7 @@
]
].
id notNil ifTrue:[
- oldFont := font.
+ oldFont := gc font.
self basicFont:newFont.
self drawVisibleLine:visLineNr with:fg and:bg.
self basicFont:oldFont.
@@ -4137,10 +4140,10 @@
!SelectionInListView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/SelectionInListView.st,v 1.272 2014-01-14 15:31:46 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/SelectionInListView.st,v 1.273 2014-02-18 16:25:39 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libwidg/SelectionInListView.st,v 1.272 2014-01-14 15:31:46 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/SelectionInListView.st,v 1.273 2014-02-18 16:25:39 stefan Exp $'
! !