summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platformthemes/gtk2/qgtk2dialoghelpers.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platformthemes/gtk2/qgtk2dialoghelpers.cpp b/src/plugins/platformthemes/gtk2/qgtk2dialoghelpers.cpp
index 857f373759..f0a54ec92f 100644
--- a/src/plugins/platformthemes/gtk2/qgtk2dialoghelpers.cpp
+++ b/src/plugins/platformthemes/gtk2/qgtk2dialoghelpers.cpp
@@ -517,8 +517,8 @@ void QGtk2FontDialogHelper::hide()
static QString qt_fontToString(const QFont &font)
{
PangoFontDescription *desc = pango_font_description_new();
- pango_font_description_set_size(desc, font.pointSizeF() * PANGO_SCALE);
- pango_font_description_set_family(desc, font.family().toUtf8());
+ pango_font_description_set_size(desc, (font.pointSizeF() > 0.0 ? font.pointSizeF() : QFontInfo(font).pointSizeF()) * PANGO_SCALE);
+ pango_font_description_set_family(desc, QFontInfo(font).family().toUtf8());
int weight = font.weight();
if (weight >= QFont::Black)