mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-05 00:55:12 +00:00
added stickers preview
This commit is contained in:
@@ -57,7 +57,7 @@ signals:
|
||||
|
||||
};
|
||||
|
||||
class BackgroundWidget : public QWidget, public Animated {
|
||||
class BackgroundWidget : public TWidget, public Animated {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
@@ -104,3 +104,39 @@ private:
|
||||
|
||||
BoxShadow shadow;
|
||||
};
|
||||
|
||||
class StickerPreviewWidget : public TWidget {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
StickerPreviewWidget(QWidget *parent);
|
||||
|
||||
void paintEvent(QPaintEvent *e);
|
||||
void resizeEvent(QResizeEvent *e);
|
||||
|
||||
bool animStep_shown(float64 ms);
|
||||
|
||||
void showPreview(DocumentData *sticker);
|
||||
void hidePreview();
|
||||
|
||||
~StickerPreviewWidget();
|
||||
|
||||
private:
|
||||
|
||||
QSize currentDimensions() const;
|
||||
QPixmap currentImage() const;
|
||||
|
||||
anim::fvalue a_shown;
|
||||
Animation _a_shown;
|
||||
DocumentData *_doc;
|
||||
|
||||
enum CacheStatus {
|
||||
CacheNotLoaded,
|
||||
CacheThumbLoaded,
|
||||
CacheLoaded,
|
||||
};
|
||||
mutable CacheStatus _cacheStatus;
|
||||
mutable QPixmap _cache;
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user