mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fixed updating of left userpic with offset from swipe-on-reply.
This commit is contained in:
parent
52e42f23ab
commit
5bd45e9a20
2 changed files with 22 additions and 4 deletions
|
@ -1235,10 +1235,19 @@ void HistoryInner::paintEvent(QPaintEvent *e) {
|
||||||
// paint the userpic if it intersects the painted rect
|
// paint the userpic if it intersects the painted rect
|
||||||
if (userpicTop + st::msgPhotoSize > clip.top()) {
|
if (userpicTop + st::msgPhotoSize > clip.top()) {
|
||||||
const auto item = view->data();
|
const auto item = view->data();
|
||||||
const auto hasTranslation = _gestureHorizontal.translation
|
const auto hasTranslation = context.gestureHorizontal.translation
|
||||||
&& (_gestureHorizontal.msgBareId == item->fullId().msg.bare);
|
&& (context.gestureHorizontal.msgBareId
|
||||||
|
== item->fullId().msg.bare);
|
||||||
if (hasTranslation) {
|
if (hasTranslation) {
|
||||||
p.translate(_gestureHorizontal.translation, 0);
|
p.translate(context.gestureHorizontal.translation, 0);
|
||||||
|
update(
|
||||||
|
QRect(
|
||||||
|
st::historyPhotoLeft
|
||||||
|
+ context.gestureHorizontal.translation,
|
||||||
|
userpicTop,
|
||||||
|
st::msgPhotoSize
|
||||||
|
- context.gestureHorizontal.translation,
|
||||||
|
st::msgPhotoSize));
|
||||||
}
|
}
|
||||||
if (const auto from = item->displayFrom()) {
|
if (const auto from = item->displayFrom()) {
|
||||||
Dialogs::Ui::PaintUserpic(
|
Dialogs::Ui::PaintUserpic(
|
||||||
|
|
|
@ -2306,9 +2306,18 @@ void ListWidget::paintUserpics(
|
||||||
if (userpicTop + st::msgPhotoSize > clip.top()) {
|
if (userpicTop + st::msgPhotoSize > clip.top()) {
|
||||||
const auto item = view->data();
|
const auto item = view->data();
|
||||||
const auto hasTranslation = context.gestureHorizontal.translation
|
const auto hasTranslation = context.gestureHorizontal.translation
|
||||||
&& (context.gestureHorizontal.msgBareId == item->fullId().msg.bare);
|
&& (context.gestureHorizontal.msgBareId
|
||||||
|
== item->fullId().msg.bare);
|
||||||
if (hasTranslation) {
|
if (hasTranslation) {
|
||||||
p.translate(context.gestureHorizontal.translation, 0);
|
p.translate(context.gestureHorizontal.translation, 0);
|
||||||
|
update(
|
||||||
|
QRect(
|
||||||
|
st::historyPhotoLeft
|
||||||
|
+ context.gestureHorizontal.translation,
|
||||||
|
userpicTop,
|
||||||
|
st::msgPhotoSize
|
||||||
|
- context.gestureHorizontal.translation,
|
||||||
|
st::msgPhotoSize));
|
||||||
}
|
}
|
||||||
if (const auto from = item->displayFrom()) {
|
if (const auto from = item->displayFrom()) {
|
||||||
from->paintUserpicLeft(
|
from->paintUserpicLeft(
|
||||||
|
|
Loading…
Add table
Reference in a new issue