mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-01-30 11:45:08 +00:00
Fix fast share button hover area.
This commit is contained in:
parent
49d2c97ceb
commit
ddab8c1473
@ -716,6 +716,7 @@ TextState Message::textState(
|
||||
}
|
||||
|
||||
if (drawBubble()) {
|
||||
const auto inBubble = g.contains(point);
|
||||
auto entry = logEntryOriginal();
|
||||
auto mediaDisplayed = media && media->isDisplayed();
|
||||
|
||||
@ -729,7 +730,7 @@ TextState Message::textState(
|
||||
}
|
||||
if (mediaOnTop) {
|
||||
trect.setY(trect.y() - st::msgPadding.top());
|
||||
} else {
|
||||
} else if (inBubble) {
|
||||
if (getStateFromName(point, trect, &result)) {
|
||||
return result;
|
||||
}
|
||||
@ -769,25 +770,27 @@ TextState Message::textState(
|
||||
result.cursor = CursorState::Date;
|
||||
}
|
||||
};
|
||||
if (mediaDisplayed) {
|
||||
auto mediaHeight = media->height();
|
||||
auto mediaLeft = trect.x() - st::msgPadding.left();
|
||||
auto mediaTop = (trect.y() + trect.height() - mediaHeight);
|
||||
if (inBubble) {
|
||||
if (mediaDisplayed) {
|
||||
auto mediaHeight = media->height();
|
||||
auto mediaLeft = trect.x() - st::msgPadding.left();
|
||||
auto mediaTop = (trect.y() + trect.height() - mediaHeight);
|
||||
|
||||
if (point.y() >= mediaTop && point.y() < mediaTop + mediaHeight) {
|
||||
result = media->textState(point - QPoint(mediaLeft, mediaTop), request);
|
||||
result.symbol += item->_text.length();
|
||||
if (point.y() >= mediaTop && point.y() < mediaTop + mediaHeight) {
|
||||
result = media->textState(point - QPoint(mediaLeft, mediaTop), request);
|
||||
result.symbol += item->_text.length();
|
||||
} else if (getStateText(point, trect, &result, request)) {
|
||||
checkForPointInTime();
|
||||
return result;
|
||||
} else if (point.y() >= trect.y() + trect.height()) {
|
||||
result.symbol = item->_text.length();
|
||||
}
|
||||
} else if (getStateText(point, trect, &result, request)) {
|
||||
checkForPointInTime();
|
||||
return result;
|
||||
} else if (point.y() >= trect.y() + trect.height()) {
|
||||
result.symbol = item->_text.length();
|
||||
}
|
||||
} else if (getStateText(point, trect, &result, request)) {
|
||||
checkForPointInTime();
|
||||
return result;
|
||||
} else if (point.y() >= trect.y() + trect.height()) {
|
||||
result.symbol = item->_text.length();
|
||||
}
|
||||
checkForPointInTime();
|
||||
if (displayRightAction()) {
|
||||
|
Loading…
Reference in New Issue
Block a user