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