mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-02 18:21:53 +00:00
Fix slide animations with new layer rounding.
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user