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

Fix slide animations with new layer rounding.

This commit is contained in:
John Preston
2022-02-23 13:53:27 +03:00
parent 1a664edd39
commit ffd65e1fe4
11 changed files with 67 additions and 60 deletions

View File

@@ -153,6 +153,7 @@ void SectionWidget::showAnimated(
myContentCache);
_showAnimation->setTopBarShadow(params.withTopBarShadow);
_showAnimation->setWithFade(params.withFade);
_showAnimation->setTopSkip(params.topSkip);
_showAnimation->start();
show();
@@ -271,10 +272,14 @@ void SectionWidget::PaintBackground(
void SectionWidget::paintEvent(QPaintEvent *e) {
if (_showAnimation) {
Painter p(this);
_showAnimation->paintContents(p, e->rect());
_showAnimation->paintContents(p);
}
}
bool SectionWidget::animatingShow() const {
return (_showAnimation != nullptr);
}
void SectionWidget::showFinished() {
_showAnimation.reset();
if (isHidden()) return;