mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-29 13:47:47 +00:00
Added ability to open context menu from inner media in service messages.
This commit is contained in:
parent
de7f983aeb
commit
d57e752ae9
@ -579,7 +579,12 @@ PointState Service::pointState(QPoint point) const {
|
||||
g.setTop(g.top() + bar->height());
|
||||
}
|
||||
if (media) {
|
||||
g.setHeight(g.height() - (st::msgServiceMargin.top() + media->height()));
|
||||
const auto centerPadding = (g.width() - media->width()) / 2;
|
||||
const auto r = g - QMargins(centerPadding, 0, centerPadding, 0);
|
||||
if (!r.contains(point)) {
|
||||
g.setHeight(g.height()
|
||||
- (st::msgServiceMargin.top() + media->height()));
|
||||
}
|
||||
}
|
||||
return g.contains(point) ? PointState::Inside : PointState::Outside;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user