forked from qt-creator/qt-creator
TextEditor: Suppress warning in QFont
Change-Id: I2ffaa8f9ebebc048c298c84143e9bf3d55520554 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -332,7 +332,7 @@ void FontSettings::setFontZoom(int zoom)
|
||||
qreal FontSettings::lineSpacing() const
|
||||
{
|
||||
QFont currentFont = font();
|
||||
currentFont.setPointSize(m_fontSize * m_fontZoom / 100);
|
||||
currentFont.setPointSize(std::max(m_fontSize * m_fontZoom / 100, 1));
|
||||
qreal spacing = QFontMetricsF(currentFont).lineSpacing();
|
||||
if (m_lineSpacing != 100)
|
||||
spacing *= qreal(m_lineSpacing) / 100;
|
||||
|
||||
Reference in New Issue
Block a user