diff --git a/src/GUI/dialog.cxx b/src/GUI/dialog.cxx index ba544f62a..c69b28efa 100644 --- a/src/GUI/dialog.cxx +++ b/src/GUI/dialog.cxx @@ -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); diff --git a/src/GUI/new_gui.hxx b/src/GUI/new_gui.hxx index 9ed87fe8c..69e1acbb7 100644 --- a/src/GUI/new_gui.hxx +++ b/src/GUI/new_gui.hxx @@ -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: