{
double absVal = rd.firstTickAbs;
for (double rel = rd.firstTickRel; rel <= relMax; rel += rd.relStep) {
- Logger::log(Logger::Level::DEBUG, ME_SENDER_STR, __QFUNC__ + QString(" rel %1 abs %2").arg(rel).arg(absVal));
drawFunc(rel, absVal, TickType::BIGTICK);
/* Draw subticks ticks */
void SignalDrawer::renderValueScaleText(QPainter* const p, int& maxCueWidth, const double rel, const double value, const TickType tt)
{
Q_UNUSED(tt);
- const int yPix = relToYPix(rel);
+ const int yPix = relToYPix(rel) + (p->fontMetrics().ascent() / 2);
const QString text = m_locale.toString(value, 'f', 2);
/* Do not draw labels that would overflow */
QRect br = p->fontMetrics().boundingRect(text);
-/* if (yPix - (br.height() / 2) < 0)
- return;*/
+ if (yPix - p->fontMetrics().ascent() < 0)
+ return;
if (maxCueWidth < br.width())
maxCueWidth = br.width();