2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-10-15 14:08:05 +00:00

Selection of text in attachments: captions, web page previews.

Text/HistoryItem/HistoryMedia::getState() unified.
Text::getStateElided added. Tested with web page previews only.
This commit is contained in:
John Preston
2016-04-13 21:29:32 +03:00
parent a033e31743
commit c4a7d48d96
19 changed files with 815 additions and 674 deletions

View File

@@ -1120,9 +1120,9 @@ void ProfileInner::updateSelected() {
ClickHandlerPtr lnk;
ClickHandlerHost *lnkhost = nullptr;
bool inText = false;
if (!_about.isEmpty() && lp.y() >= _aboutTop && lp.y() < _aboutTop + _aboutHeight && lp.x() >= _left && lp.x() < _left + _width) {
_about.getState(lnk, inText, lp.x() - _left, lp.y() - _aboutTop, _width);
auto textState = _about.getState(lp.x() - _left, lp.y() - _aboutTop, _width);
lnk = textState.link;
lnkhost = this;
}
ClickHandler::setActive(lnk, lnkhost);