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

Use crl::time/now instead of TimeMs/getms.

This commit is contained in:
John Preston
2019-02-19 10:57:53 +04:00
parent d208236994
commit fe618bd652
310 changed files with 1133 additions and 1141 deletions

View File

@@ -217,7 +217,7 @@ void LayerStackWidget::BackgroundWidget::paintEvent(QPaintEvent *e) {
auto specialLayerBox = _specialLayerCache.isNull() ? _specialLayerBox : _specialLayerCacheBox;
auto layerBox = _layerCache.isNull() ? _layerBox : _layerCacheBox;
auto ms = getms();
auto ms = crl::now();
auto mainMenuProgress = _a_mainMenuShown.current(ms, -1);
auto mainMenuRight = (_mainMenuCache.isNull() || mainMenuProgress < 0) ? _mainMenuRight : (mainMenuProgress < 0) ? _mainMenuRight : anim::interpolate(0, _mainMenuCacheWidth, mainMenuProgress);
if (mainMenuRight) {
@@ -861,7 +861,7 @@ void MediaPreviewWidget::paintEvent(QPaintEvent *e) {
auto image = currentImage();
int w = image.width() / cIntRetinaFactor(), h = image.height() / cIntRetinaFactor();
auto shown = _a_shown.current(getms(), _hiding ? 0. : 1.);
auto shown = _a_shown.current(crl::now(), _hiding ? 0. : 1.);
if (!_a_shown.animating()) {
if (_hiding) {
hide();
@@ -1043,7 +1043,7 @@ QPixmap MediaPreviewWidget::currentImage() const {
if (_gif && _gif->started()) {
auto s = currentDimensions();
auto paused = _controller->isGifPausedAtLeastFor(Window::GifPauseReason::MediaPreview);
return _gif->current(s.width(), s.height(), s.width(), s.height(), ImageRoundRadius::None, RectPart::None, paused ? 0 : getms());
return _gif->current(s.width(), s.height(), s.width(), s.height(), ImageRoundRadius::None, RectPart::None, paused ? 0 : crl::now());
}
if (_cacheStatus != CacheThumbLoaded
&& _document->hasThumbnail()) {