2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Show animated previews for GIFs in SendFilesBox.

This commit is contained in:
John Preston
2017-03-10 17:43:26 +03:00
parent a1b53c660e
commit 6c00b7efde
2 changed files with 107 additions and 7 deletions

View File

@@ -66,6 +66,8 @@ private:
void prepareSingleFileLayout();
void prepareDocumentLayout();
void tryToReadSingleFile();
void prepareGifPreview();
void clipCallback(Media::Clip::Notification notification);
void updateTitleText();
void updateBoxSize();
@@ -84,6 +86,7 @@ private:
int _previewLeft = 0;
int _previewWidth = 0;
int _previewHeight = 0;
Media::Clip::ReaderPointer _gifPreview;
QPixmap _fileThumb;
Text _nameText;
@@ -131,6 +134,8 @@ protected:
private:
void updateBoxSize();
void prepareGifPreview(DocumentData *document);
void clipCallback(Media::Clip::Notification notification);
void saveDone(const MTPUpdates &updates);
bool saveFail(const RPCError &error);
@@ -141,6 +146,7 @@ private:
bool _doc = false;
QPixmap _thumb;
Media::Clip::ReaderPointer _gifPreview;
object_ptr<Ui::InputArea> _field = { nullptr };