2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Use new HistoryWallPaper media type for wallpaper.

This commit is contained in:
John Preston
2019-01-29 19:26:19 +03:00
parent fd8e9dad92
commit 5ca12a73c3
24 changed files with 683 additions and 192 deletions

View File

@@ -166,6 +166,7 @@ public:
}
bool checkWallPaperProperties();
[[nodiscard]] bool isWallPaper() const;
[[nodiscard]] bool isPatternWallPaper() const;
[[nodiscard]] bool hasThumbnail() const;
void loadThumbnail(Data::FileOrigin origin);
@@ -342,6 +343,26 @@ protected:
};
class DocumentWrappedClickHandler : public DocumentClickHandler {
public:
DocumentWrappedClickHandler(
ClickHandlerPtr wrapped,
not_null<DocumentData*> document,
FullMsgId context = FullMsgId())
: DocumentClickHandler(document, context)
, _wrapped(wrapped) {
}
protected:
void onClickImpl() const override {
_wrapped->onClick({ Qt::LeftButton });
}
private:
ClickHandlerPtr _wrapped;
};
QString FileNameForSave(
const QString &title,
const QString &filter,