tell the layouter about the default font (I wonder why
LayoutWidget::setDefaultFont() wants puFont* /and/ pointsize as extra parameters, when puFont knows its pointsize anyway. Didn't want to change that yet, though.) Now the HELVETICA_10 font makes actually sense. :-)
This commit is contained in:
parent
18a874f1b2
commit
f65eb6e3d5
2 changed files with 7 additions and 2 deletions
|
@ -368,6 +368,9 @@ FGDialog::display (SGPropertyNode * props)
|
|||
// Let the layout widget work in the same property subtree.
|
||||
LayoutWidget wid(props);
|
||||
|
||||
puFont *fnt = _gui->getDefaultFont();
|
||||
wid.setDefaultFont(fnt, fnt->getPointSize());
|
||||
|
||||
int pw=0, ph=0;
|
||||
if(!userw || !userh)
|
||||
wid.calcPrefSize(&pw, &ph);
|
||||
|
|
|
@ -151,8 +151,10 @@ public:
|
|||
*/
|
||||
virtual FGDialog * getActiveDialog ();
|
||||
|
||||
const FGColor& getColor (const char * which) { return _colors[which]; }
|
||||
const FGColor& getColor (string which) { return _colors[which.c_str()]; }
|
||||
virtual const FGColor& getColor (const char * which) { return _colors[which]; }
|
||||
virtual const FGColor& getColor (string which) { return _colors[which.c_str()]; }
|
||||
|
||||
virtual puFont *getDefaultFont() { return &_font; }
|
||||
|
||||
protected:
|
||||
|
||||
|
|
Loading…
Reference in a new issue