mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Reduced redundant calculations of animation in chart widget.
This commit is contained in:
@@ -57,16 +57,16 @@ private:
|
||||
crl::time _alphaAnimationStartedAt = 0;
|
||||
bool _heightAnimationStarted = false;
|
||||
|
||||
anim::value _animValueXMin;
|
||||
anim::value _animValueXMax;
|
||||
anim::value _animValueYMin;
|
||||
anim::value _animValueYMax;
|
||||
anim::value _animationValueXMin;
|
||||
anim::value _animationValueXMax;
|
||||
anim::value _animationValueHeightMin;
|
||||
anim::value _animationValueHeightMax;
|
||||
|
||||
anim::value _animValueYAlpha;
|
||||
|
||||
Limits _finalHeightLimits;
|
||||
|
||||
float _dtYSpeed = 0.;
|
||||
float _dtHeightSpeed = 0.;
|
||||
Limits _dtCurrent;
|
||||
|
||||
rpl::event_stream<> _heightAnimationStarts;
|
||||
@@ -78,40 +78,11 @@ private:
|
||||
|
||||
bool _useMinHeight = false;
|
||||
|
||||
Limits _currentHeight;
|
||||
Limits _animateToHeight;
|
||||
Limits _thresholdHeight = { -1, 0 };
|
||||
Limits _startFrom;
|
||||
Limits _startFromH;
|
||||
|
||||
Limits _xPercentageLimits;
|
||||
// struct {
|
||||
// Ui::Animations::Basic animation;
|
||||
|
||||
// crl::time lastUserInteracted = 0;
|
||||
// crl::time yAnimationStartedAt = 0;
|
||||
// crl::time alphaAnimationStartedAt = 0;
|
||||
|
||||
// anim::value animValueXMin;
|
||||
// anim::value animValueXMax;
|
||||
// anim::value animValueYMin;
|
||||
// anim::value animValueYMax;
|
||||
|
||||
// anim::value animValueYAlpha;
|
||||
|
||||
// float dtYSpeed = 0.;
|
||||
// Limits dtCurrent;
|
||||
// } _xPercentage;
|
||||
ChartAnimationController _animationController;
|
||||
|
||||
float64 _minMaxUpdateStep = 0.;
|
||||
|
||||
crl::time _lastHeightLimitsChanged = 0;
|
||||
|
||||
std::vector<ChartHorizontalLinesData> _horizontalLines;
|
||||
|
||||
Ui::Animations::Simple _heightLimitsAnimation;
|
||||
|
||||
};
|
||||
|
||||
} // namespace Statistic
|
||||
|
Reference in New Issue
Block a user