2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-03 16:05:57 +00:00

Use new animations engine in all Basic-s.

This commit is contained in:
John Preston
2019-04-01 21:44:54 +04:00
parent cd3c1c6dc0
commit a6e96f9a28
41 changed files with 479 additions and 487 deletions

View File

@@ -66,7 +66,7 @@ protected:
void onStateChanged(State was, StateChangeSource source) override;
private:
void step_radial(crl::time ms, bool timer);
void radialAnimationCallback();
QString _text;
const style::FlatButton &_st;
@@ -95,8 +95,8 @@ void DialogsWidget::BottomButton::setText(const QString &text) {
update();
}
void DialogsWidget::BottomButton::step_radial(crl::time ms, bool timer) {
if (timer && !anim::Disabled() && width() < st::columnMinimalWidthLeft) {
void DialogsWidget::BottomButton::radialAnimationCallback() {
if (!anim::Disabled() && width() < st::columnMinimalWidthLeft) {
update();
}
}
@@ -106,7 +106,7 @@ void DialogsWidget::BottomButton::onStateChanged(State was, StateChangeSource so
if ((was & StateFlag::Disabled) != (state() & StateFlag::Disabled)) {
_loading = isDisabled()
? std::make_unique<Ui::InfiniteRadialAnimation>(
animation(this, &BottomButton::step_radial),
[=] { radialAnimationCallback(); },
st::dialogsLoadMoreLoading)
: nullptr;
if (_loading) {