Mercurial > hg > octave-shane
changeset 16617:3a17dd5964e3
use average width for character size in GUI terminal for Windows
* QWinTErminalImpl.cpp (QConsolePrivate::updateConsoleSize):
Use QFontMetrics::averageCharWidth instead of maxWidth.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Mon, 06 May 2013 00:56:09 -0400 |
parents | b383c8a22116 |
children | 13728d41fb6a |
files | libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp +++ b/libgui/qterminal/libqterminal/win32/QWinTerminalImpl.cpp @@ -490,10 +490,10 @@ QFontMetrics fm (m_font); QSize winSize = m_consoleView->size (); - m_charSize.rwidth () = fm.maxWidth (); + m_charSize.rwidth () = fm.averageCharWidth (); m_charSize.rheight () = fm.lineSpacing (); - m_consoleRect.setWidth (winSize.width () / fm.maxWidth ()); + m_consoleRect.setWidth (winSize.width () / fm.averageCharWidth ()); m_consoleRect.setHeight (winSize.height () / fm.lineSpacing ()); m_bufferSize.rwidth () = m_consoleRect.width ();