diff options
author | ck <qt-info@nokia.com> | 2009-11-16 16:42:39 (GMT) |
---|---|---|
committer | ck <qt-info@nokia.com> | 2009-11-16 16:42:39 (GMT) |
commit | f7dbb28ca4fcb56e01dc79cec7df77f80fe530a8 (patch) | |
tree | d1cc38c44f473bbdc0784d44b78f088280d0580c /tools/shared/fontpanel/fontpanel.cpp | |
parent | f3556c2afa373cd37cb64e35b4b1d990558396c8 (diff) | |
download | Qt-f7dbb28ca4fcb56e01dc79cec7df77f80fe530a8.zip Qt-f7dbb28ca4fcb56e01dc79cec7df77f80fe530a8.tar.gz Qt-f7dbb28ca4fcb56e01dc79cec7df77f80fe530a8.tar.bz2 |
Assistant/Designer: Fix handling of oblique font styles.
Task-number: QT-1764
Reviewed-by: kh1
Diffstat (limited to 'tools/shared/fontpanel/fontpanel.cpp')
-rw-r--r-- | tools/shared/fontpanel/fontpanel.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/shared/fontpanel/fontpanel.cpp b/tools/shared/fontpanel/fontpanel.cpp index 46ce144..c2defc7 100644 --- a/tools/shared/fontpanel/fontpanel.cpp +++ b/tools/shared/fontpanel/fontpanel.cpp @@ -96,8 +96,12 @@ QFont FontPanel::selectedFont() const const QString family = rc.family(); rc.setPointSize(pointSize()); const QString styleDescription = styleString(); - rc.setItalic(m_fontDatabase.italic(family, styleDescription)); - + if (styleDescription.contains(QLatin1String("Italic"))) + rc.setStyle(QFont::StyleItalic); + else if (styleDescription.contains(QLatin1String("Oblique"))) + rc.setStyle(QFont::StyleOblique); + else + rc.setStyle(QFont::StyleNormal); rc.setBold(m_fontDatabase.bold(family, styleDescription)); // Weight < 0 asserts... |