1
0
mirror of https://github.com/Swordfish90/cool-retro-term.git synced 2025-01-31 02:01:19 +00:00

Use qFloor instead of qRound to compute the number of columns of the terminal.

This commit is contained in:
Filippo Scognamiglio 2014-09-14 01:02:54 +02:00
parent 53897f8186
commit d1280f28c2

View File

@ -1996,7 +1996,7 @@ void KTerminalDisplay::calcGeometry()
_contentHeight = height() - 2 * DEFAULT_TOP_MARGIN + /* mysterious */ 1; _contentHeight = height() - 2 * DEFAULT_TOP_MARGIN + /* mysterious */ 1;
// ensure that display is always at least one column wide // ensure that display is always at least one column wide
_columns = qMax(1, qRound(_contentWidth / _fontWidth)); _columns = qMax(1, qFloor(_contentWidth / _fontWidth));
_usedColumns = qMin(_usedColumns,_columns); _usedColumns = qMin(_usedColumns,_columns);
// ensure that display is always at least one line high // ensure that display is always at least one line high