2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35: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

@@ -72,7 +72,7 @@ public:
, _check(st, _updateCallback) {
}
void paint(Painter &p, TimeMs ms, QPoint position, int outerWidth, bool selected, bool selecting);
void paint(Painter &p, crl::time ms, QPoint position, int outerWidth, bool selected, bool selecting);
void setActive(bool active);
void setPressed(bool pressed);
@@ -93,7 +93,7 @@ private:
};
void Checkbox::paint(Painter &p, TimeMs ms, QPoint position, int outerWidth, bool selected, bool selecting) {
void Checkbox::paint(Painter &p, crl::time ms, QPoint position, int outerWidth, bool selected, bool selecting) {
_check.setDisplayInactive(selecting);
_check.setChecked(selected);
const auto pression = _pression.current(ms, (_active && _pressed) ? 1. : 0.);
@@ -235,7 +235,7 @@ void RadialProgressItem::setLinks(ClickHandlerPtr &&openl, ClickHandlerPtr &&sav
_cancell = std::move(cancell);
}
void RadialProgressItem::step_radial(TimeMs ms, bool timer) {
void RadialProgressItem::step_radial(crl::time ms, bool timer) {
const auto updateRadial = [&] {
return _radial->update(dataProgress(), dataFinished(), ms);
};
@@ -265,7 +265,7 @@ void RadialProgressItem::checkRadialFinished() {
RadialProgressItem::~RadialProgressItem() = default;
void StatusText::update(int newSize, int fullSize, int duration, TimeMs realDuration) {
void StatusText::update(int newSize, int fullSize, int duration, crl::time realDuration) {
setSize(newSize);
if (_size == FileStatusSizeReady) {
_text = (duration >= 0) ? formatDurationAndSizeText(duration, fullSize) : (duration < -1 ? formatGifAndSizeText(fullSize) : formatSizeText(fullSize));

View File

@@ -29,7 +29,7 @@ class Checkbox;
class PaintContext : public PaintContextBase {
public:
PaintContext(TimeMs ms, bool selecting) : PaintContextBase(ms, selecting), isAfterDate(false) {
PaintContext(crl::time ms, bool selecting) : PaintContextBase(ms, selecting), isAfterDate(false) {
}
bool isAfterDate;
@@ -129,12 +129,12 @@ protected:
ClickHandlerPtr &&cancell);
void setDocumentLinks(not_null<DocumentData*> document);
void step_radial(TimeMs ms, bool timer);
void step_radial(crl::time ms, bool timer);
void ensureRadial();
void checkRadialFinished();
bool isRadialAnimation(TimeMs ms) const {
bool isRadialAnimation(crl::time ms) const {
if (!_radial || !_radial->animating()) return false;
_radial->step(ms);
@@ -156,7 +156,7 @@ protected:
class StatusText {
public:
// duration = -1 - no duration, duration = -2 - "GIF" duration
void update(int newSize, int fullSize, int duration, TimeMs realDuration);
void update(int newSize, int fullSize, int duration, crl::time realDuration);
void setSize(int newSize);
int size() const {