mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-06 17:45:11 +00:00
Clip intro animation by Next button.
This commit is contained in:
@@ -233,6 +233,9 @@ bool Step::paintAnimated(Painter &p, QRect clip) {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (!_coverAnimation.clipping.isEmpty()) {
|
||||
p.setClipRect(_coverAnimation.clipping);
|
||||
}
|
||||
|
||||
auto progress = (hasCover() ? anim::easeOutCirc(1., dt) : anim::linear(1., dt));
|
||||
auto arrivingAlpha = progress;
|
||||
@@ -451,6 +454,10 @@ void Step::showAnimated(Direction direction) {
|
||||
}
|
||||
}
|
||||
|
||||
void Step::setShowAnimationClipping(QRect clipping) {
|
||||
_coverAnimation.clipping = clipping;
|
||||
}
|
||||
|
||||
void Step::setGoCallback(Fn<void(Step *step, Direction direction)> callback) {
|
||||
_goCallback = std::move(callback);
|
||||
}
|
||||
|
Reference in New Issue
Block a user