2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +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

@@ -57,8 +57,8 @@ private:
bool radialLoading() const;
QRect radialRect() const;
void radialStart();
TimeMs radialTimeShift() const;
void step_radial(TimeMs ms, bool timer);
crl::time radialTimeShift() const;
void step_radial(crl::time ms, bool timer);
QPixmap _background;
object_ptr<Ui::LinkButton> _chooseFromGallery;
@@ -94,7 +94,7 @@ public:
int left,
int top,
int outerWidth,
TimeMs ms) override;
crl::time ms) override;
QImage prepareRippleMask() const override;
bool checkRippleStartPosition(QPoint position) const override;
@@ -142,7 +142,7 @@ void BackgroundRow::paintEvent(QPaintEvent *e) {
bool radial = false;
float64 radialOpacity = 0;
if (_radial.animating()) {
_radial.step(getms());
_radial.step(crl::now());
radial = _radial.animating();
radialOpacity = _radial.opacity();
}
@@ -240,16 +240,16 @@ void BackgroundRow::radialStart() {
_radial.update(
radialProgress(),
!radialLoading(),
getms() + shift);
crl::now() + shift);
}
}
}
TimeMs BackgroundRow::radialTimeShift() const {
crl::time BackgroundRow::radialTimeShift() const {
return st::radialDuration;
}
void BackgroundRow::step_radial(TimeMs ms, bool timer) {
void BackgroundRow::step_radial(crl::time ms, bool timer) {
const auto updated = _radial.update(
radialProgress(),
!radialLoading(),
@@ -325,7 +325,7 @@ void DefaultTheme::paint(
int left,
int top,
int outerWidth,
TimeMs ms) {
crl::time ms) {
const auto received = QRect(
st::settingsThemeBubblePosition,
st::settingsThemeBubbleSize);
@@ -353,7 +353,7 @@ void DefaultTheme::paint(
(outerWidth - radio.width()) / 2,
getSize().height() - radio.height() - st::settingsThemeRadioBottom,
outerWidth,
getms());
crl::now());
}
QImage DefaultTheme::prepareRippleMask() const {