2103 |
2103 |
2104 drawWith:fg and:bg |
2104 drawWith:fg and:bg |
2105 "redraw myself with fg/bg. Use super to draw the label, add |
2105 "redraw myself with fg/bg. Use super to draw the label, add |
2106 the return-arrow here." |
2106 the return-arrow here." |
2107 |
2107 |
2108 |x y sColor lColor etchFg savLogo shownLogo isEnabled| |
2108 |x y sColor lColor etchFg shownLogo isEnabled| |
2109 |
2109 |
2110 shown ifFalse:[^ self]. |
2110 shown ifFalse:[^ self]. |
2111 |
2111 |
2112 isEnabled := self enabled. |
2112 isEnabled := self enabled. |
2113 isEnabled ifFalse:[ |
2113 isEnabled ifFalse:[ |
2114 etchFg := disabledEtchedFgColor. |
2114 etchFg := disabledEtchedFgColor. |
2115 ]. |
2115 ]. |
2116 |
2116 |
2117 (controller active or:[controller pressed]) ifTrue:[ |
2117 false ifTrue:[ |
2118 shownLogo := activeLogo ? enteredLogo ? passiveLogo ? logo. |
2118 "/ that breaks the checkToggle - it MUST be done elsewhere |
2119 ] ifFalse:[ |
2119 "/ never ever change the label from within the redraw method !!!!!! |
2120 shownLogo := passiveLogo ? logo. |
2120 (controller active or:[controller pressed]) ifTrue:[ |
2121 (enteredLogo notNil and:[controller entered]) ifTrue:[ |
2121 shownLogo := activeLogo ? enteredLogo ? passiveLogo ? logo. |
2122 shownLogo := enteredLogo. |
2122 ] ifFalse:[ |
|
2123 shownLogo := passiveLogo ? logo. |
|
2124 (enteredLogo notNil and:[controller entered]) ifTrue:[ |
|
2125 shownLogo := enteredLogo. |
|
2126 ]. |
2123 ]. |
2127 ]. |
2124 ]. |
2128 (disabledLogo notNil and:[isEnabled not]) ifTrue:[ |
2125 (disabledLogo notNil and:[isEnabled not]) ifTrue:[ |
2129 shownLogo := disabledLogo. |
2126 shownLogo := disabledLogo. |
2130 ]. |
2127 ]. |
2131 shownLogo ~= logo ifTrue:[ |
2128 shownLogo ~= logo ifTrue:[ |
2132 self label:shownLogo redraw:false. |
2129 self label:shownLogo. |
2133 ]. |
2130 ]. |
2134 ]. |
2131 |
2135 |
2132 self drawWith:fg and:bg clearInside:true etchedFg:etchFg. "this draws the text/image" |
2136 self drawWith:fg and:bg clearInside:true etchedFg:etchFg. "this draws the text/image" |
2133 |
2137 |
2134 (isReturnButton and:[shadowForm notNil]) ifTrue:[ |
2138 (isReturnButton and:[shadowForm notNil]) ifTrue:[ |