2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 07:25:46 +00:00

optimized gifs scroll in saved gifs section

This commit is contained in:
John Preston
2015-12-30 01:33:56 +08:00
parent 38ea16fea4
commit d72a3c4189
5 changed files with 28 additions and 11 deletions

View File

@@ -1368,7 +1368,7 @@ void LayoutSavedGif::paint(Painter &p, bool paused, uint64 ms) const {
if (!_data->thumb->isNull()) {
if (_data->thumb->loaded()) {
if (_thumb.width() != _width * cIntRetinaFactor() || _thumb.height() != height * cIntRetinaFactor()) {
const_cast<LayoutSavedGif*>(this)->_thumb = _data->thumb->pixNoCache(frame.width(), frame.height(), true, false, false, _width, height);
const_cast<LayoutSavedGif*>(this)->_thumb = _data->thumb->pixNoCache(frame.width() * cIntRetinaFactor(), frame.height() * cIntRetinaFactor(), true, false, false, _width, height);
}
} else {
_data->thumb->load();