Small LookAndFeel request

I know it may possibly not seem wholly in the spirit of the LookAndFeel class, but the setColour/findColour function is an excellent way of quickly adding colour definitions to an app, without having to subclass/cast LookAndFeel all the time. You can just add a colour at the start of a program, and refer to it where it’s needed.

Now, I think it would be very handy if a similar thing could be put in for general appearance values. E.g. the width for label text of some custom component being used in your application. It could just be LookAndFeel::setLookValue(int id, float value) and float LookAndFeel::findLookValue(int id). I suppose you may not think it’s what LookAndFeel should be used for, but when prototyping it could save a LOT of time in neat consistent interface design.

Hmm - not a bad idea, but values for specific purposes could just be added as member variables to the look and feel class in most cases, don’t you think?

Yeah, but for a customised app that means subclassing LookAndFeel for such a small purpose, and then having to cast to the new type when accessing it. It’s usually such a small simple thing to want to do that it’s a chore to have to do all that.

Oh, so you mean putting values in the lookandfeel for use by a component, rather than by the l+f object itself? You could do the same thing with component properties - just set a property in the root component, and the child comps could get it when they need it.