Commit 802902f2 authored by Aurélien Gâteau's avatar Aurélien Gâteau

Measure lengths, not positions

parent 26a09f1f
......@@ -948,6 +948,9 @@ void KLineal::drawScaleTick( QPainter &painter, int x, int len )
int w = width();
int h = height();
// Offset by one because we are measuring lengths, not position, so when the
// indicator is at position 0 it measures a length of 1 pixel.
if ( mHorizontal ) {
painter.drawLine( x, 0, x, len );
painter.drawLine( x, h, x, h - len );
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