Don't cut off zoomed font sizes to the nearest integer point size

This caused it to go to 0 when for example displaying size 9 at 10%,
which is an invalid value so it caused the text to revert back to the
default size.

It also caused zooming to sometimes appearing to have no effect. For
example zooming size 9 to 110% would still yield size 9 rather than 9.9.

Task-number: QTCREATORBUG-2744
Task-number: QTCREATORBUG-2745
Reviewed-by: Robert Loehning
Reviewed-by: hjk
This commit is contained in:
Thorbjørn Lindeijer
2010-10-15 17:19:36 +02:00
parent 4af1d09535
commit c5d5657c13
3 changed files with 5 additions and 5 deletions

View File

@@ -172,7 +172,7 @@ QTextCharFormat FontSettings::toTextCharFormat(const QString &category) const
if (category == textCategory) {
tf.setFontFamily(m_family);
tf.setFontPointSize(m_fontSize * m_fontZoom / 100);
tf.setFontPointSize(m_fontSize * m_fontZoom / 100.);
tf.setFontStyleStrategy(m_antialias ? QFont::PreferAntialias : QFont::NoAntialias);
}