Adjust the widget size of the room list items
This commit is contained in:
parent
420937ab83
commit
844443a324
7 changed files with 100 additions and 70 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue