mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix userpic glitch in folder chats lists.
This commit is contained in:
parent
c3f20c59b5
commit
e3f2dcec22
2 changed files with 5 additions and 4 deletions
|
@ -356,16 +356,15 @@ PaintRoundImageCallback ChatRow::generatePaintUserpicCallback(
|
||||||
peer->paintUserpicLeft(p, userpic, x, y, outerWidth, size);
|
peer->paintUserpicLeft(p, userpic, x, y, outerWidth, size);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
if (!_disabled) {
|
||||||
|
return paint;
|
||||||
|
}
|
||||||
return [=](
|
return [=](
|
||||||
Painter &p,
|
Painter &p,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
int outerWidth,
|
int outerWidth,
|
||||||
int size) mutable {
|
int size) mutable {
|
||||||
if (!_disabled) {
|
|
||||||
paint(p, x, y, outerWidth, size);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const auto wide = size + style::ConvertScale(3);
|
const auto wide = size + style::ConvertScale(3);
|
||||||
const auto full = QSize(wide, wide) * style::DevicePixelRatio();
|
const auto full = QSize(wide, wide) * style::DevicePixelRatio();
|
||||||
auto repaint = false;
|
auto repaint = false;
|
||||||
|
|
|
@ -429,6 +429,7 @@ void RoundImageCheckbox::setChecked(bool newChecked, anim::type animated) {
|
||||||
if (!changed) {
|
if (!changed) {
|
||||||
if (animated == anim::type::instant) {
|
if (animated == anim::type::instant) {
|
||||||
_selection.stop();
|
_selection.stop();
|
||||||
|
_wideCache = QPixmap();
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -451,6 +452,7 @@ void RoundImageCheckbox::setChecked(bool newChecked, anim::type animated) {
|
||||||
anim::bumpy(1.25));
|
anim::bumpy(1.25));
|
||||||
} else {
|
} else {
|
||||||
_selection.stop();
|
_selection.stop();
|
||||||
|
_wideCache = QPixmap();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue