summaryrefslogtreecommitdiffstats
path: root/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2016-02-24 14:47:20 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2016-02-24 14:47:20 +0000
commitb736151c2bb6c68f700d38274d740a6e0cf59a49 (patch)
tree83e110a7205757addba6e86a3c2367e4b52afa05 /src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
parentff76300a5c9f209f625384f35ad0fdb0acebd799 (diff)
parent1fadc7292b66d4b3984bf5ef36c70b46b07a1c6b (diff)
Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7
Diffstat (limited to 'src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp')
-rw-r--r--src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp b/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
index 4dbbadb847..a21b4d8a65 100644
--- a/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
+++ b/src/plugins/platformthemes/gtk3/qgtk3dialoghelpers.cpp
@@ -506,8 +506,8 @@ void QGtk3FontDialogHelper::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)