From fbb8f39945dd3991353a33ff783aae5ae2e9f8e8 Mon Sep 17 00:00:00 2001 From: Erik Verbruggen Date: Mon, 12 Apr 2010 15:37:08 +0200 Subject: [PATCH] Fixed ruler alignment on MacOS for fonts with fractional metrics. Task-number: QTCREATORBUG-1065 Reviewed-by: mae --- src/plugins/texteditor/basetexteditor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/plugins/texteditor/basetexteditor.cpp b/src/plugins/texteditor/basetexteditor.cpp index 0a3bad33cb1..a83684b7cc1 100644 --- a/src/plugins/texteditor/basetexteditor.cpp +++ b/src/plugins/texteditor/basetexteditor.cpp @@ -2989,13 +2989,13 @@ void BaseTextEditor::extraAreaPaintEvent(QPaintEvent *e) QTextBlock block = firstVisibleBlock(); int blockNumber = block.blockNumber(); - int top = (int) blockBoundingGeometry(block).translated(contentOffset()).top(); - int bottom = top; + qreal top = blockBoundingGeometry(block).translated(contentOffset()).top(); + qreal bottom = top; while (block.isValid() && top <= e->rect().bottom()) { top = bottom; - bottom = top + (int)blockBoundingRect(block).height(); + bottom = top + blockBoundingRect(block).height(); QTextBlock nextBlock = block.next(); QTextBlock nextVisibleBlock = nextBlock;