summary refs log tree commit diff
path: root/src/TypingDisplay.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/TypingDisplay.cpp')
-rw-r--r--src/TypingDisplay.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/TypingDisplay.cpp b/src/TypingDisplay.cpp

index 11313adc..97aeb268 100644 --- a/src/TypingDisplay.cpp +++ b/src/TypingDisplay.cpp
@@ -69,7 +69,7 @@ TypingDisplay::paintEvent(QPaintEvent *) text_ = fm.elidedText(text_, Qt::ElideRight, (double)(width() * 0.75)); QPainterPath path; - path.addRoundedRect(QRectF(0, 0, fm.width(text_) + 2 * LEFT_PADDING, height()), 3, 3); + path.addRoundedRect(QRectF(0, 0, fm.horizontalAdvance(text_) + 2 * LEFT_PADDING, height()), 3, 3); p.fillPath(path, backgroundColor()); p.drawText(region, Qt::AlignVCenter, text_);