[Pharo-dev] 13204 Hard to see Morph halo label
stepharo at free.fr
Thu May 1 04:04:16 EDT 2014
OK I understand.
On 18/4/14 01:12, Sean P. DeNigris wrote:
> 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:
> StringMorph>>#drawOn: aCanvas
> "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