New profile photo edit by drag-n-drop. Animated photo button.

This commit is contained in:
John Preston
2016-05-27 13:57:11 +03:00
parent 329285a8a6
commit 3570a1cf91
26 changed files with 531 additions and 147 deletions
+3 -3
View File
@@ -335,10 +335,10 @@ void EmojiButton::paintEvent(QPaintEvent *e) {
void EmojiButton::setLoading(bool loading) {
if (_loading != loading) {
EnsureAnimation(a_loading, _loading ? 1. : 0., func(this, &EmojiButton::updateCallback));
a_loading.start(loading ? 1. : 0., st::emojiCircleDuration);
_loading = loading;
if (_loading) {
auto from = loading ? 0. : 1., to = loading ? 1. : 0.;
START_ANIMATION(a_loading, func(this, &EmojiButton::updateCallback), from, to, st::emojiCircleDuration, anim::linear);
if (loading) {
_a_loading.start();
} else {
_a_loading.stop();