From 844443a324ee6bda200de46c947b019b03b44205 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Sat, 6 Oct 2018 17:21:03 +0300 Subject: Adjust the widget size of the room list items --- src/TypingDisplay.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/TypingDisplay.cpp') diff --git a/src/TypingDisplay.cpp b/src/TypingDisplay.cpp index 97d2c713..11313adc 100644 --- a/src/TypingDisplay.cpp +++ b/src/TypingDisplay.cpp @@ -56,13 +56,16 @@ TypingDisplay::paintEvent(QPaintEvent *) Painter p(this); PainterHighQualityEnabler hq(p); - p.setFont(font()); + QFont f; + f.setPointSizeF(f.pointSizeF() * 0.9); + + p.setFont(f); p.setPen(QPen(textColor())); QRect region = rect(); region.translate(LEFT_PADDING, 0); - QFontMetrics fm(font()); + QFontMetrics fm(f); text_ = fm.elidedText(text_, Qt::ElideRight, (double)(width() * 0.75)); QPainterPath path; -- cgit 1.5.1