[libcalamaresui] Better default font size

- Previously, unless setDefaultFontSize() was called explicitly,
  the default size would be 0, leading to unexpected and weird
  displays (and a warning on stderr).
- If setDefaultFontSize() is not called, get a sensible size instead
  (like defaultFontHeight() was already trying to do).
This commit is contained in:
Adriaan de Groot 2020-05-19 16:25:30 +02:00
parent 8db8752a41
commit ec2fc5a763

View File

@ -207,6 +207,10 @@ unmarginLayout( QLayout* layout )
int
defaultFontSize()
{
if ( s_defaultFontSize <= 0 )
{
s_defaultFontSize = QFont().pointSize();
}
return s_defaultFontSize;
}