LookAndFeel::getlabelFont()


#1

What's this supposed to be doing exactly?  I was assuming that it would set a default font for a lable that can be overridden by the label's setFont() method.  

I can see it's being used in Label, but as far as I can tell, only with respect to the label's TextEditor component.  Shouldn't the label constructor be calling getLookAndFeel().getLabelFont() to initialize the private font member?

Or am I missing the intent of that LAF method?

 


#2

It's there so that you can override the font that's set with Label::setFont if you want to. Yes, it'd be better if it just returned a font and if Label::setFont didn't exist, but is done this way for backwards-compatibility.


#3

Actually, I should have looked at the implementation of LookAndFeel as that makes it obvious what's going on.  I have my own LAF which was altering the behaviour.