2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

photoviewer updated, recent emojis filled with some by default

This commit is contained in:
John Preston
2014-10-17 16:57:14 +04:00
parent e1adf54b36
commit f07606a0ce
35 changed files with 709 additions and 243 deletions

View File

@@ -58,6 +58,9 @@ namespace anim {
const float64 &current() const {
return _cur;
}
float64 to() const {
return _from + _delta;
}
fvalue &update(const float64 &dt, transition func) {
_cur = _from + (*func)(_delta, dt);
return *this;
@@ -93,6 +96,9 @@ namespace anim {
int32 current() const {
return _cur;
}
int32 to() const {
return _from + _delta;
}
ivalue &update(const float64 &dt, transition func) {
_cur = qRound(_from + (*func)(_delta, dt));
return *this;
@@ -145,6 +151,14 @@ namespace anim {
const QColor &current() const {
return _cur;
}
QColor to() const {
QColor result;
result.setRedF(_from_r + _delta_r);
result.setGreenF(_from_g + _delta_g);
result.setBlueF(_from_b + _delta_b);
result.setAlphaF(_from_a + _delta_a);
return result;
}
cvalue &update(const float64 &dt, transition func) {
_cur.setRedF(_from_r + (*func)(_delta_r, dt));
_cur.setGreenF(_from_g + (*func)(_delta_g, dt));