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:
@@ -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));
|
||||
|
@@ -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 {
|
||||
|
Reference in New Issue
Block a user