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

Removed anim::cvalue and ColorAnimation, all done by fvalue now.

Also moved style::interpolate to anim::color/anim::pen/anim::brush.
This commit is contained in:
John Preston
2016-11-07 14:24:19 +03:00
parent 0326976473
commit 23c2e5364a
55 changed files with 483 additions and 602 deletions

View File

@@ -172,7 +172,7 @@ void Gif::paint(Painter &p, const QRect &clip, const PaintContext *context) cons
auto radialOpacity = (radial && loaded) ? _animation->radial.opacity() : 1.;
if (_animation && _animation->_a_over.animating(context->ms)) {
auto over = _animation->_a_over.current();
p.fillRect(r, style::interpolate(st::msgDateImgBg, st::msgDateImgBgOver, over));
p.fillRect(r, anim::brush(st::msgDateImgBg, st::msgDateImgBgOver, over));
} else {
auto over = (_state & StateFlag::Over);
p.fillRect(r, over ? st::msgDateImgBgOver : st::msgDateImgBg);
@@ -708,11 +708,11 @@ void File::paint(Painter &p, const QRect &clip, const PaintContext *context) con
auto inner = rtlrect(0, st::inlineRowMargin, st::msgFileSize, st::msgFileSize, _width);
p.setPen(Qt::NoPen);
if (isThumbAnimation(context->ms)) {
float64 over = _animation->a_thumbOver.current();
p.setBrush(style::interpolate(st::msgFileInBg, st::msgFileInBgOver, over));
auto over = _animation->a_thumbOver.current();
p.setBrush(anim::brush(st::msgFileInBg, st::msgFileInBgOver, over));
} else {
bool over = ClickHandler::showAsActive(document->loading() ? _cancel : _open);
p.setBrush((over ? st::msgFileInBgOver : st::msgFileInBg));
p.setBrush(over ? st::msgFileInBgOver : st::msgFileInBg);
}
p.setRenderHint(QPainter::HighQualityAntialiasing);