Fixed overlapping right badges on ellipsis in dialogs list.

This commit is contained in:
23rd 2023-09-03 17:51:29 +03:00 committed by John Preston
parent 738aff9c4f
commit aad1296829
1 changed files with 4 additions and 1 deletions

View File

@ -365,7 +365,10 @@ void MessageView::paint(
if (!_imagesCache.empty()) {
rect.setLeft(rect.x() + st::dialogsMiniPreviewRight);
}
if (!rect.isEmpty()) {
// Style of _textCache.
static const auto ellipsisWidth = st::dialogsTextStyle.font->width(
kQEllipsis);
if (rect.width() > ellipsisWidth) {
_textCache.draw(p, {
.position = rect.topLeft(),
.availableWidth = rect.width(),