mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Fix position of invite button and elide long button texts
This commit is contained in:
parent
ba25771c08
commit
932dbf38fe
1 changed files with 7 additions and 3 deletions
|
@ -65,7 +65,7 @@ getMetrics(const QFont &font)
|
||||||
m.unreadLineOffset = m.padding - m.padding / 4;
|
m.unreadLineOffset = m.padding - m.padding / 4;
|
||||||
|
|
||||||
m.inviteBtnX = m.iconSize + 2 * m.padding;
|
m.inviteBtnX = m.iconSize + 2 * m.padding;
|
||||||
m.inviteBtnX = m.iconSize / 2.0 + m.padding + m.padding / 3.0;
|
m.inviteBtnY = m.iconSize / 2.0 + m.padding + m.padding / 3.0;
|
||||||
|
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
|
@ -241,8 +241,12 @@ RoomInfoListItem::paintEvent(QPaintEvent *event)
|
||||||
|
|
||||||
p.setPen(QPen(btnTextColor_));
|
p.setPen(QPen(btnTextColor_));
|
||||||
p.setFont(QFont{});
|
p.setFont(QFont{});
|
||||||
p.drawText(acceptBtnRegion_, Qt::AlignCenter, tr("Accept"));
|
p.drawText(acceptBtnRegion_,
|
||||||
p.drawText(declineBtnRegion_, Qt::AlignCenter, tr("Decline"));
|
Qt::AlignCenter,
|
||||||
|
metrics.elidedText(tr("Accept"), Qt::ElideRight, btnWidth));
|
||||||
|
p.drawText(declineBtnRegion_,
|
||||||
|
Qt::AlignCenter,
|
||||||
|
metrics.elidedText(tr("Decline"), Qt::ElideRight, btnWidth));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue