mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 22:46:10 +00:00
Slightly clarified name of y-axis animation in chart widget.
This commit is contained in:
@@ -281,10 +281,10 @@ void ChartWidget::ChartAnimationController::tick(
|
|||||||
constexpr auto kXExpandingDuration = 200.;
|
constexpr auto kXExpandingDuration = 200.;
|
||||||
constexpr auto kAlphaExpandingDuration = 200.;
|
constexpr auto kAlphaExpandingDuration = 200.;
|
||||||
|
|
||||||
if (!_yAnimationStartedAt
|
if (!_heightAnimationStarted
|
||||||
&& ((now - _lastUserInteracted) >= kExpandingDelay)) {
|
&& ((now - _lastUserInteracted) >= kExpandingDelay)) {
|
||||||
_heightAnimationStarts.fire({});
|
_heightAnimationStarts.fire({});
|
||||||
_yAnimationStartedAt = _lastUserInteracted + kExpandingDelay;
|
_heightAnimationStarted = true;
|
||||||
}
|
}
|
||||||
if (!_alphaAnimationStartedAt) {
|
if (!_alphaAnimationStartedAt) {
|
||||||
_alphaAnimationStartedAt = now;
|
_alphaAnimationStartedAt = now;
|
||||||
@@ -324,7 +324,7 @@ void ChartWidget::ChartAnimationController::tick(
|
|||||||
_animValueXMin.update(dtX, anim::linear);
|
_animValueXMin.update(dtX, anim::linear);
|
||||||
_animValueXMax.update(dtX, anim::linear);
|
_animValueXMax.update(dtX, anim::linear);
|
||||||
}
|
}
|
||||||
if (_yAnimationStartedAt) {
|
if (_heightAnimationStarted) {
|
||||||
_animValueYMin.update(_dtCurrent.min, anim::easeInCubic);
|
_animValueYMin.update(_dtCurrent.min, anim::easeInCubic);
|
||||||
_animValueYMax.update(_dtCurrent.max, anim::easeInCubic);
|
_animValueYMax.update(_dtCurrent.max, anim::easeInCubic);
|
||||||
_animValueYAlpha.update(dtAlpha, anim::easeInCubic);
|
_animValueYAlpha.update(dtAlpha, anim::easeInCubic);
|
||||||
@@ -357,7 +357,7 @@ void ChartWidget::ChartAnimationController::tick(
|
|||||||
|
|
||||||
if (yFinished && alphaFinished) {
|
if (yFinished && alphaFinished) {
|
||||||
_alphaAnimationStartedAt = 0;
|
_alphaAnimationStartedAt = 0;
|
||||||
_yAnimationStartedAt = 0;
|
_heightAnimationStarted = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -54,8 +54,8 @@ private:
|
|||||||
Ui::Animations::Basic _animation;
|
Ui::Animations::Basic _animation;
|
||||||
|
|
||||||
crl::time _lastUserInteracted = 0;
|
crl::time _lastUserInteracted = 0;
|
||||||
crl::time _yAnimationStartedAt = 0;
|
|
||||||
crl::time _alphaAnimationStartedAt = 0;
|
crl::time _alphaAnimationStartedAt = 0;
|
||||||
|
bool _heightAnimationStarted = false;
|
||||||
|
|
||||||
anim::value _animValueXMin;
|
anim::value _animValueXMin;
|
||||||
anim::value _animValueXMax;
|
anim::value _animValueXMax;
|
||||||
|
Reference in New Issue
Block a user