--- a/Button.st Fri Sep 18 10:31:49 2009 +0200
+++ b/Button.st Fri Sep 18 14:43:37 2009 +0200
@@ -2151,7 +2151,7 @@
"redraw myself with fg/bg. Use super to draw the label, add
the return-arrow here."
- |x y sColor lColor etchFg savLogo isEnabled|
+ |x y sColor lColor etchFg savLogo shownLogo isEnabled|
shown ifFalse:[^ self].
@@ -2160,24 +2160,23 @@
etchFg := disabledEtchedFgColor.
].
- savLogo := logo.
-
(controller active or:[controller pressed]) ifTrue:[
- logo := activeLogo ? enteredLogo ? savLogo.
+ shownLogo := activeLogo ? enteredLogo ? passiveLogo ? logo.
] ifFalse:[
- logo := passiveLogo ? savLogo.
+ shownLogo := passiveLogo ? logo.
(enteredLogo notNil and:[controller entered]) ifTrue:[
- logo := enteredLogo.
+ shownLogo := enteredLogo.
].
].
(disabledLogo notNil and:[isEnabled not]) ifTrue:[
- logo := disabledLogo.
+ shownLogo := disabledLogo.
+ ].
+ shownLogo ~= logo ifTrue:[
+ self label:shownLogo.
].
self drawWith:fg and:bg clearInside:true etchedFg:etchFg. "this draws the text/image"
- logo := savLogo.
-
(isReturnButton and:[shadowForm notNil]) ifTrue:[
y := (height - shadowForm height) // 2.
x := width - shadowForm width - (hSpace // 2).
@@ -2357,5 +2356,5 @@
!Button class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/Button.st,v 1.143 2009-09-18 08:31:49 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/Button.st,v 1.144 2009-09-18 12:43:37 cg Exp $'
! !