2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +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

@@ -119,10 +119,10 @@ void ConfirmBox::updateHover() {
QPoint m(mapFromGlobal(_lastMousePos));
textstyleSet(&st::boxTextStyle);
ClickHandlerPtr handler = _text.linkLeft(m.x() - st::boxPadding.left(), m.y() - st::boxPadding.top(), _textWidth, width(), style::al_left);
auto state = _text.getStateLeft(m.x() - st::boxPadding.left(), m.y() - st::boxPadding.top(), _textWidth, width());
textstyleRestore();
ClickHandler::setActive(handler, this);
ClickHandler::setActive(state.link, this);
}
void ConfirmBox::closePressed() {