--- a/ArrowButton.st Thu Aug 31 07:01:01 1995 +0200
+++ b/ArrowButton.st Thu Sep 07 14:46:28 1995 +0200
@@ -30,7 +30,7 @@
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libwidg/ArrowButton.st,v 1.16 1995-08-31 05:01:01 claus Exp $
+$Header: /cvs/stx/stx/libwidg/ArrowButton.st,v 1.17 1995-09-07 12:44:14 claus Exp $
'!
!ArrowButton class methodsFor:'documentation'!
@@ -51,7 +51,7 @@
version
"
-$Header: /cvs/stx/stx/libwidg/ArrowButton.st,v 1.16 1995-08-31 05:01:01 claus Exp $
+$Header: /cvs/stx/stx/libwidg/ArrowButton.st,v 1.17 1995-09-07 12:44:14 claus Exp $
"
!
@@ -642,7 +642,7 @@
drawWith:fg and:bg
"this is a q&d hack for motif ..."
- |topLeft botRight noColor allColor isString orgX orgY|
+ |topLeft botRight noColor allColor isString orgX orgY r|
arrowStyle ~~ #motif ifTrue:[
^ super drawWith:fg and:bg.
@@ -675,11 +675,15 @@
isString ifFalse:[
logo depth ~~ 1 ifTrue:[
"/ allow for 4-bit logos (for motif)
-
- logo colorMap:(Array with:bg
- with:topLeft
- with:botRight
- with:fg).
+ "/ one catch: if the view background is a complex pixmap
+ "/ we cannot use this as colorMap entry.
+ "/ therefore, compute their average colors and take these
+ "/ (this looks ok for buttons ...)
+ r := (0@0 corner:10@10).
+ logo colorMap:(Array with:(bg averageColorIn:r)
+ with:(topLeft averageColorIn:r)
+ with:(botRight averageColorIn:r)
+ with:(fg averageColorIn:r)).
logo photometric:#palette.
self displayForm:logo x:labelOriginX y:labelOriginY.
^ self