From c1b3d589c774d555468042f543f43baf67f382b4 Mon Sep 17 00:00:00 2001 From: John Preston Date: Fri, 11 Jan 2019 15:02:29 +0400 Subject: [PATCH] Fix elision in document extension in MediaView. Fixes #5555. --- Telegram/SourceFiles/mediaview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Telegram/SourceFiles/mediaview.cpp b/Telegram/SourceFiles/mediaview.cpp index 0748b0d8b..ddde69431 100644 --- a/Telegram/SourceFiles/mediaview.cpp +++ b/Telegram/SourceFiles/mediaview.cpp @@ -1654,8 +1654,8 @@ void MediaView::displayDocument(DocumentData *doc, HistoryItem *item) { // empty int32 extmaxw = (st::mediaviewFileIconSize - st::mediaviewFileExtPadding * 2); _docExtWidth = st::mediaviewFileExtFont->width(_docExt); if (_docExtWidth > extmaxw) { - _docExt = st::mediaviewFileNameFont->elided(_docExt, extmaxw, Qt::ElideMiddle); - _docExtWidth = st::mediaviewFileNameFont->width(_docExt); + _docExt = st::mediaviewFileExtFont->elided(_docExt, extmaxw, Qt::ElideMiddle); + _docExtWidth = st::mediaviewFileExtFont->width(_docExt); } } else { _doc->thumb->load(fileOrigin());