# HG changeset patch # User Claus Gittinger # Date 989580123 -7200 # Node ID b46624bb699404c663d7def50cf8ebbf2eb40b57 # Parent 6fecdd5341dcda16b9e697e029a928d87aa7082a use white handles, if the views background color is dark. diff -r 6fecdd5341dc -r b46624bb6994 UIPainterView.st --- 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.