[Pharo-dev] 13204 Hard to see Morph halo label
Sean P. DeNigris
sean at clipperadams.com
Thu Apr 17 19:12:38 EDT 2014
pharo4Stef at free.fr wrote
> Why not just a StringMorph with correct background?
That doesn't look possible with the current implementation. It just draws
the string with no background:
"super drawOn: aCanvas. <- This line doesn't exist"
aCanvas drawString: contents in: bnd font: self fontToUse color: color.
>From the "... color: color" above, it looks like StringMorph is hijacking
the instVar it inherited from Morph, which usually means background color,
to use for the text color.
If you hack drawOn: to
self color: Color white.
super drawOn: aCanvas.
aCanvas drawString: contents in: bnd font: self fontToUse color: Color
you get the halo label you're looking for but of course break everything
So I think that if we want StringMorphs to have backgrounds, we have to add
a textColor instVar, initialize color to Color transparent, and rewrite all
color assignments in StringMorph to set textColor.
In short: not for 3.0.
View this message in context: http://forum.world.st/13204-Hard-to-see-Morph-halo-label-tp4755115p4755242.html
Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
More information about the Pharo-dev