--- a/UIPainterView.st Tue May 08 11:34:29 2001 +0200
+++ b/UIPainterView.st Fri May 11 13:22:03 2001 +0200
@@ -14,7 +14,7 @@
UIObjectView subclass:#UIPainterView
instanceVariableNames:'treeView listHolder superclassName className methodName
- categoryName handleColor handleMasterColor'
+ categoryName handleColorBlack handleColorWhite handleMasterColor'
classVariableNames:'HandCursor RedefineAspectMethods AspectsAsInstances'
poolDictionaries:''
category:'Interface-UIPainter'
@@ -1417,7 +1417,8 @@
"
super create.
- handleColor := handleColor onDevice:device.
+ handleColorBlack := handleColorBlack onDevice:device.
+ handleColorWhite := handleColorWhite onDevice:device.
handleMasterColor := handleMasterColor onDevice:device.
!
@@ -1430,7 +1431,8 @@
methodName := 'windowSpec'.
categoryName := 'Applications'.
HandCursor := Cursor leftHand.
- handleColor := Color black.
+ handleColorBlack := Color black.
+ handleColorWhite := Color white.
handleMasterColor := Color red.
self backgroundColor: self class defaultViewBackgroundColor.
@@ -1509,8 +1511,15 @@
sel := treeView selection.
(sel size > 1 and:
[(treeView model list at: sel first) contents view == aComponent])
- ifTrue: [hColor := handleMasterColor]
- ifFalse:[hColor := handleColor].
+ ifTrue: [
+ hColor := handleMasterColor
+ ] ifFalse:[
+ aComponent viewBackground brightness < 0.5 ifTrue:[
+ hColor := handleColorWhite
+ ] ifFalse:[
+ hColor := handleColorBlack
+ ]
+ ].
self paint:hColor.