diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-05-16 21:21:31 +0300 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-05-16 21:21:31 +0300 |
commit | c470e49aa9d6c97e805eb193afab97e9e19814eb (patch) | |
tree | 1189eee2a50a65516a972c743ade5029c36a7c3e /include | |
parent | Show user info even if the display name or avatar are missing (diff) | |
download | nheko-c470e49aa9d6c97e805eb193afab97e9e19814eb.tar.xz |
Add geometry animation on emoji picker
Diffstat (limited to 'include')
-rw-r--r-- | include/EmojiPanel.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/EmojiPanel.h b/include/EmojiPanel.h index 5e053216..99c8fa63 100644 --- a/include/EmojiPanel.h +++ b/include/EmojiPanel.h @@ -20,6 +20,7 @@ #include <QFrame> #include <QGraphicsOpacityEffect> +#include <QParallelAnimationGroup> #include <QPropertyAnimation> #include <QScrollArea> #include <QWidget> @@ -47,13 +48,22 @@ protected: private: void showEmojiCategory(const EmojiCategory *category); - QPropertyAnimation *animation_; + QPropertyAnimation *opacity_anim_; + QPropertyAnimation *size_anim_; QGraphicsOpacityEffect *opacity_; + QParallelAnimationGroup *animation_; EmojiProvider emoji_provider_; QScrollArea *scroll_area_; + // Panel dimensions. + const int WIDTH = 370; + const int HEIGHT = 350; + + const int ANIMATION_DURATION = 100; + const int ANIMATION_OFFSET = 50; + const int category_icon_size_ = 20; }; |