2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-02 23:55:12 +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

@@ -969,19 +969,11 @@ void ContactsBox::Inner::paintDialog(Painter &p, uint64 ms, PeerData *peer, Cont
namew -= icon->width();
icon->paint(p, namex + qMin(data->name.maxWidth(), namew), st::contactsPadding.top() + st::contactsNameTop, width());
}
if (checkedRatio > 0) {
if (checkedRatio < 1) {
p.setPen(style::interpolate(st::contactsNameFg, st::contactsNameCheckedFg, checkedRatio));
} else {
p.setPen(st::contactsNameCheckedFg);
}
} else {
p.setPen(st::contactsNameFg);
}
p.setPen(anim::pen(st::contactsNameFg, st::contactsNameCheckedFg, checkedRatio));
data->name.drawLeftElided(p, namex, st::contactsPadding.top() + st::contactsNameTop, namew, width());
bool uname = (user || peer->isChannel()) && (data->statusText.at(0) == '@');
p.setFont(st::contactsStatusFont->f);
p.setFont(st::contactsStatusFont);
if (uname && !_lastQuery.isEmpty() && peer->userName().startsWith(_lastQuery, Qt::CaseInsensitive)) {
int availw = width() - namex - st::contactsPadding.right();
QString first = '@' + peer->userName().mid(0, _lastQuery.size()), second = peer->userName().mid(_lastQuery.size());