mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-26 09:48:45 -05:00
Level meter: make sure text and minor ticks do not collide
This commit is contained in:
parent
b32330780b
commit
c786e3f6f9
@ -201,14 +201,14 @@ void LevelMeterVU::resized()
|
|||||||
{
|
{
|
||||||
if ((tick.textSize > 0) && (tick.textPos > 0))
|
if ((tick.textSize > 0) && (tick.textPos > 0))
|
||||||
{
|
{
|
||||||
painter.drawText(QPointF(tick.textPos - (tick.textSize/2) - 2, bar.height()/2), tick.text);
|
painter.drawText(QPointF(tick.textPos - (tick.textSize/2) - 4, bar.height()/2 - 3), tick.text);
|
||||||
}
|
}
|
||||||
|
|
||||||
painter.drawLine(shiftx(tick.pos, bar.width()), 0, shiftx(scaleTickList[i].pos, bar.width()), bar.height());
|
painter.drawLine(shiftx(tick.pos, bar.width()), 0, shiftx(scaleTickList[i].pos, bar.width()), bar.height());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
painter.drawLine(tick.pos, bar.height()/4, scaleTickList[i].pos, bar.height()/2);
|
painter.drawLine(tick.pos, bar.height()/2 - 2, scaleTickList[i].pos, bar.height()/2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -324,14 +324,14 @@ void LevelMeterSignalDB::resized()
|
|||||||
{
|
{
|
||||||
if ((tick.textSize > 0) && (tick.textPos > 0))
|
if ((tick.textSize > 0) && (tick.textPos > 0))
|
||||||
{
|
{
|
||||||
painter.drawText(QPointF(tick.textPos - (tick.textSize/2) - 4, bar.height()/2 - 1), tick.text);
|
painter.drawText(QPointF(tick.textPos - (tick.textSize/2) - 4, bar.height()/2 - 3), tick.text);
|
||||||
}
|
}
|
||||||
|
|
||||||
painter.drawLine(shiftx(tick.pos, bar.width()), 0, shiftx(scaleTickList[i].pos,bar.width()), bar.height());
|
painter.drawLine(shiftx(tick.pos, bar.width()), 0, shiftx(scaleTickList[i].pos,bar.width()), bar.height());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
painter.drawLine(tick.pos, bar.height()/4, scaleTickList[i].pos, bar.height()/2);
|
painter.drawLine(tick.pos, bar.height()/2 - 2, scaleTickList[i].pos, bar.height()/2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user