Fix userpic glitch in folder chats lists.

This commit is contained in:
John Preston 2023-04-07 15:17:24 +04:00
parent c3f20c59b5
commit e3f2dcec22
2 changed files with 5 additions and 4 deletions

View File

@ -356,16 +356,15 @@ PaintRoundImageCallback ChatRow::generatePaintUserpicCallback(
peer->paintUserpicLeft(p, userpic, x, y, outerWidth, size);
}
};
if (!_disabled) {
return paint;
}
return [=](
Painter &p,
int x,
int y,
int outerWidth,
int size) mutable {
if (!_disabled) {
paint(p, x, y, outerWidth, size);
return;
}
const auto wide = size + style::ConvertScale(3);
const auto full = QSize(wide, wide) * style::DevicePixelRatio();
auto repaint = false;

View File

@ -429,6 +429,7 @@ void RoundImageCheckbox::setChecked(bool newChecked, anim::type animated) {
if (!changed) {
if (animated == anim::type::instant) {
_selection.stop();
_wideCache = QPixmap();
}
return;
}
@ -451,6 +452,7 @@ void RoundImageCheckbox::setChecked(bool newChecked, anim::type animated) {
anim::bumpy(1.25));
} else {
_selection.stop();
_wideCache = QPixmap();
}
}