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

Allow to blur wallpapers from file.

This commit is contained in:
John Preston
2019-02-08 16:43:31 +03:00
parent e2f0886950
commit 890aacaeee
5 changed files with 42 additions and 37 deletions

View File

@@ -17,7 +17,7 @@ class WallPaper {
public:
explicit WallPaper(WallPaperId id);
void setLocalImageAsThumbnail(not_null<Image*> image);
void setLocalImageAsThumbnail(std::shared_ptr<Image> image);
[[nodiscard]] WallPaperId id() const;
[[nodiscard]] std::optional<QColor> backgroundColor() const;
@@ -43,6 +43,7 @@ public:
[[nodiscard]] WallPaper withPatternIntensity(int intensity) const;
[[nodiscard]] WallPaper withBackgroundColor(QColor color) const;
[[nodiscard]] WallPaper withParamsFrom(const WallPaper &other) const;
[[nodiscard]] WallPaper withoutImageData() const;
[[nodiscard]] static std::optional<WallPaper> Create(
const MTPWallPaper &data);
@@ -75,7 +76,7 @@ private:
int _intensity = kDefaultIntensity;
DocumentData *_document = nullptr;
Image *_thumbnail = nullptr;
std::shared_ptr<Image> _thumbnail;
};