Commit fbb8f399 authored by Erik Verbruggen's avatar Erik Verbruggen
Browse files

Fixed ruler alignment on MacOS for fonts with fractional metrics.

Task-number: QTCREATORBUG-1065
Reviewed-by: mae
parent be0dfb8c
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment