2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

inline gifs playback / stopping done

This commit is contained in:
John Preston
2015-12-23 19:48:44 +03:00
parent 9a72293e0a
commit 6170144fe9
17 changed files with 143 additions and 42 deletions

View File

@@ -1000,7 +1000,11 @@ void MediaView::displayDocument(DocumentData *doc, HistoryItem *item) { // empty
int32 maxw = st::mvDocSize.width() - st::mvDocIconSize - st::mvDocPadding * 3;
_docName = (!_doc || _doc->name.isEmpty()) ? lang(_doc ? (_doc->type == StickerDocument ? lng_in_dlg_sticker : lng_mediaview_doc_image) : lng_message_empty) : _doc->name;
if (_doc) {
_docName = (_doc->type == StickerDocument) ? lang(lng_in_dlg_sticker) : (_doc->type == AnimatedDocument ? qsl("GIF") : (_doc->name.isEmpty() ? lang(lng_mediaview_doc_image) : _doc->name));
} else {
_docName = lang(lng_message_empty);
}
_docNameWidth = st::mvDocNameFont->width(_docName);
if (_docNameWidth > maxw) {
_docName = st::mvDocNameFont->elided(_docName, maxw, Qt::ElideMiddle);