forked from qt-creator/qt-creator
Help plugin: Fix handling of oblique font style.
Reviewed-by: kh1
This commit is contained in:
@@ -146,7 +146,12 @@ void GeneralSettingsPage::apply()
|
|||||||
if (currentIndex != -1)
|
if (currentIndex != -1)
|
||||||
fontStyle = m_ui.styleComboBox->itemText(currentIndex);
|
fontStyle = m_ui.styleComboBox->itemText(currentIndex);
|
||||||
font.setBold(fontDatabase.bold(family, fontStyle));
|
font.setBold(fontDatabase.bold(family, fontStyle));
|
||||||
font.setItalic(fontDatabase.italic(family, fontStyle));
|
if (fontStyle.contains(QLatin1String("Italic")))
|
||||||
|
font.setStyle(QFont::StyleItalic);
|
||||||
|
else if (fontStyle.contains(QLatin1String("Oblique")))
|
||||||
|
font.setStyle(QFont::StyleOblique);
|
||||||
|
else
|
||||||
|
font.setStyle(QFont::StyleNormal);
|
||||||
|
|
||||||
const int weight = fontDatabase.weight(family, fontStyle);
|
const int weight = fontDatabase.weight(family, fontStyle);
|
||||||
if (weight >= 0) // Weight < 0 asserts...
|
if (weight >= 0) // Weight < 0 asserts...
|
||||||
|
|||||||
Reference in New Issue
Block a user