If you have not already implemented it this way, I can suggest an approach that we use elsewhere: first paint the text using the normal text color, and then paint it again using the "highlighted" text color, but restrict the clip region to the "filled" area of the meter.

On Oct 29, 2009, at 10:37 AM, Greg Brown wrote:

Not sure how you implemented it, but the original intent was to define two text colors - one to paint over the "blue" area and another to paint over the "gray" background. That way, we can ensure that there is good contrast between the text and the background (unless the caller changes the colors, but we don't have any control over that).

On Oct 29, 2009, at 10:32 AM, Noel Grandin wrote:


I was following the lead of the best looking widget I could find on the
web.
Of which there were only a few - Apple's HIG seems to discourage putting text into Meters, and I don't personally think it looks all that great
myself.

I don't know what else I could use that would be guaranteed to contrast
well with the fill colour.

Greg Brown wrote:
Just wondering - why are you trying to match the display background
here? Might there be another color you could pull from the theme that
would be appropriate?

On Oct 29, 2009, at 10:23 AM, Noel Grandin wrote:


One of the things I don't like in my commit here is that I'm hard- coding a color (Color.LIGHT_GRAY), which I had to do to match the background
color, which is also hard-coded in DisplaySkin.

Surely these colours should be in the theme file?

Mind you, now that I am searching for them I see that quite a lot of Skin classes hard-code colors. I guess that's a problem for another day.

-- Noel.

[email protected] wrote:

Reply via email to