[subsurface] Prettier profile colors (#89)

Dirk Hohndel dirk at hohndel.org
Mon Nov 28 14:16:33 PST 2011


On Mon, 28 Nov 2011 23:08:55 +0100, Henrik Brautaset Aronsen <subsurface at henrik.synth.no> wrote:
> On 28.11.11 22:42, Dirk Hohndel wrote:
> > I guess the grid color should be more visible.  Not too much, though, it
> > was really too verbose in the previous version.
> > Not sure you have broad agreement on that statement :-)
> 
> grumble grumble grumle.

ramble ramble ramle

> >>>> Well, I didn't remove the sac_color and velocity_color tables since they
> >>>> where dependent on calculated index numbers.  Wouldn't want to mess up
> >>>> more code in this commit.
> > Understood - but that's the next thing you should do. Remember, you can
> > do math with enums, so you can simply change the sac and velocity index
> > calculations to add the base index of the first correspondong enum.
> > Should be straight forward.
> 
> Yup.  But it feels wrong somehow, what if someone adds a color in the 
> middle of the enum, breaking the order of things?  Guess I'll just 
> comment properly.

Nonono. You have one table that maps colors to RGBA.
You have a second table that has as indices the values of color_t and
then two elements, one the screen color, one the printer color.

So if someone inserts a new color, they'll insert it in the first table,
but that doesn't change the fact that the SAC colors and VELOCITY colors
in the second table are still a continuous set of entries.

> >> I was planning to work some more on the patch tonight, but I cannot get
> >> anything to build at home right now.   Worked like a charm at work.
> >> Bah.  Feel free to fix my mess if you want :)
> > I doubt I'll get to that today - I'm playing around with more changes
> > for the Mac version to look more "Mac like" :-)
> 
> Cool!  I got the build going again, by the way, so I'm looking at it 
> again.  Had to add "-framework CoreFoundation" when linking.  I didn't 
> have to that at my other machine.  Hmm.

I don't need that here, either. What's different between this system and
your other? Mine is an iMac with Lion.

/D



More information about the subsurface mailing list