mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-08 08:04:08 +02:00
Slightly clarified name of y-axis animation in chart widget.
This commit is contained in:
parent
20e81177a6
commit
77695091b3
2 changed files with 5 additions and 5 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue