2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Use new animations engine everywhere.

This commit is contained in:
John Preston
2019-04-02 13:13:30 +04:00
parent a6e96f9a28
commit 99bb09374d
162 changed files with 753 additions and 826 deletions

View File

@@ -132,7 +132,7 @@ void Manager::demoMasterOpacityCallback() {
}
float64 Manager::demoMasterOpacity() const {
return _demoMasterOpacity.current(Global::NotificationsDemoIsShown() ? 0. : 1.);
return _demoMasterOpacity.value(Global::NotificationsDemoIsShown() ? 0. : 1.);
}
void Manager::checkLastInput() {
@@ -444,7 +444,7 @@ void Widget::hideAnimated(float64 duration, const anim::transition &func) {
}
void Widget::updateOpacity() {
setWindowOpacity(_a_opacity.current(_hiding ? 0. : 1.) * _manager->demoMasterOpacity());
setWindowOpacity(_a_opacity.value(_hiding ? 0. : 1.) * _manager->demoMasterOpacity());
}
void Widget::changeShift(int top) {
@@ -632,8 +632,8 @@ void Notification::paintEvent(QPaintEvent *e) {
auto buttonsLeft = st::notifyPhotoPos.x() + st::notifyPhotoSize + st::notifyTextLeft;
auto buttonsTop = st::notifyTextTop + st::msgNameFont->height;
if (a_actionsOpacity.animating(crl::now())) {
p.setOpacity(a_actionsOpacity.current());
if (a_actionsOpacity.animating()) {
p.setOpacity(a_actionsOpacity.value(1.));
p.drawPixmapRight(st::notifyBorderWidth, buttonsTop, width(), _buttonsCache);
} else if (_actionsVisible) {
p.drawPixmapRight(st::notifyBorderWidth, buttonsTop, width(), _buttonsCache);