mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Added ability to open context menu from inner media in service messages.
This commit is contained in:
parent
de7f983aeb
commit
d57e752ae9
1 changed files with 6 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue