mirror of
https://github.com/vale981/tdesktop
synced 2025-03-06 02:01:40 -05:00
Fix fast share button hover area.
This commit is contained in:
parent
49d2c97ceb
commit
ddab8c1473
1 changed files with 16 additions and 13 deletions
|
@ -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…
Add table
Reference in a new issue