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
@@ -264,17 +264,20 @@ void LayerWidget::doSetInnerFocus() {
void LayerWidget::paintEvent(QPaintEvent *e) {
Painter p(this);
auto clip = e->rect();
auto r = st::boxRadius;
const auto clip = e->rect();
const auto radius = st::boxRadius;
auto parts = RectPart::None | 0;
if (clip.intersects({ 0, 0, width(), r })) {
parts |= RectPart::FullTop;
}
if (!_tillBottom) {
if (clip.intersects({ 0, height() - r, width(), r })) {
if (clip.intersects({ 0, height() - radius, width(), radius })) {
parts |= RectPart::FullBottom;
}
}
if (_content->animatingShow()) {
if (clip.intersects({ 0, 0, width(), radius })) {
parts |= RectPart::FullTop;
}
parts |= RectPart::Left | RectPart::Center | RectPart::Right;
}
if (parts) {
Ui::FillRoundRect(
p,