summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-01-31 09:27:34 -0700
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-01-31 09:27:34 -0700
commit96e99710fcc4ef5c24604f34029cc35f9737705a (patch)
treeebf76d611c0bb50f79c4447006f2361b6dec835f /src
parentRemove version number for nightly releases (diff)
downloadnheko-96e99710fcc4ef5c24604f34029cc35f9737705a.tar.xz
Second attempt to fix failback text size for ImageItem
Diffstat (limited to 'src')
-rw-r--r--src/timeline/widgets/ImageItem.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/timeline/widgets/ImageItem.cc b/src/timeline/widgets/ImageItem.cc

index 8008e810..f713989e 100644 --- a/src/timeline/widgets/ImageItem.cc +++ b/src/timeline/widgets/ImageItem.cc
@@ -198,7 +198,7 @@ ImageItem::paintEvent(QPaintEvent *event) font.setPixelSize(conf::fontSize); QFontMetrics metrics(font); - const int fontHeight = metrics.height() + metrics.lineSpacing(); + const int fontHeight = metrics.height() + metrics.ascent(); if (image_.isNull()) { QString elidedText = metrics.elidedText(text_, Qt::ElideRight, max_width_ - 10); @@ -223,7 +223,7 @@ ImageItem::paintEvent(QPaintEvent *event) // Bottom text section if (underMouse()) { - const int textBoxHeight = 2 * fontHeight; + const int textBoxHeight = fontHeight / 2 + 6; textRegion_ = QRectF(0, height_ - textBoxHeight, width_, textBoxHeight);