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

Fix overlapping texts

parent 74eae42a
......@@ -1104,9 +1104,7 @@ void KLineal::drawScale( QPainter &painter )
if ( digit % 20 == 0 ) len = 15;
if ( digit % 100 == 0 ) len = 18;
if ( digit % 20 == 0 ) {
font.setBold( digit % 100 == 0 );
painter.setFont( font );
if ( digit % 100 == 0 ) {
QString units;
units.sprintf( "%d", digit );
QSize textSize = metrics.size( Qt::TextSingleLine, units );
......@@ -1151,9 +1149,6 @@ void KLineal::drawScale( QPainter &painter )
float step = longLen / 100.f;
int len;
font.setBold( true );
painter.setFont( font );
for ( int i = 0; i <= 100; ++i ) {
int x = (int)( i * step );
len = ( i % 10 ) ? 6 : 15;
......
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