Add enough space for the failback text in ImageItem

pull/1/head
Konstantinos Sideris 7 years ago
parent 07a4e38ed8
commit 117a739bc4
  1. 4
      src/timeline/widgets/ImageItem.cc

@ -198,7 +198,7 @@ ImageItem::paintEvent(QPaintEvent *event)
font.setPixelSize(conf::fontSize);
QFontMetrics metrics(font);
const int fontHeight = metrics.ascent();
const int fontHeight = metrics.height() + metrics.lineSpacing();
if (image_.isNull()) {
QString elidedText = metrics.elidedText(text_, Qt::ElideRight, max_width_ - 10);
@ -207,7 +207,7 @@ ImageItem::paintEvent(QPaintEvent *event)
painter.setFont(font);
painter.setPen(QPen(QColor(66, 133, 244)));
painter.drawText(QPoint(0, fontHeight), elidedText);
painter.drawText(QPoint(0, fontHeight / 2), elidedText);
return;
}

Loading…
Cancel
Save