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

version 0.6.11 fixed photos click area

This commit is contained in:
John Preston
2014-11-18 16:59:18 +03:00
parent 85ca7e0f05
commit 922ab40c75
14 changed files with 35 additions and 29 deletions

View File

@@ -3849,7 +3849,10 @@ int32 HistoryMessage::resize(int32 width, bool dontRecountText, const HistoryIte
bool HistoryMessage::hasPoint(int32 x, int32 y) const {
int32 left = _out ? st::msgMargin.right() : st::msgMargin.left(), width = _history->width - st::msgMargin.left() - st::msgMargin.right(), mwidth = st::msgMaxWidth;
if (_media && _media->maxWidth() > mwidth) mwidth = _media->maxWidth();
if (_media) {
if (_media->maxWidth() > mwidth) mwidth = _media->maxWidth();
if (_media->currentWidth() < mwidth) mwidth = _media->currentWidth();
}
if (width > mwidth) {
if (_out) left += width - mwidth;
width = mwidth;
@@ -3876,7 +3879,10 @@ void HistoryMessage::getState(TextLinkPtr &lnk, bool &inText, int32 x, int32 y)
lnk = TextLinkPtr();
int32 left = _out ? st::msgMargin.right() : st::msgMargin.left(), width = _history->width - st::msgMargin.left() - st::msgMargin.right(), mwidth = st::msgMaxWidth;
if (_media && _media->maxWidth() > mwidth) mwidth = _media->maxWidth();
if (_media) {
if (_media->maxWidth() > mwidth) mwidth = _media->maxWidth();
if (_media->currentWidth() < mwidth) mwidth = _media->currentWidth();
}
if (width > mwidth) {
if (_out) left += width - mwidth;
width = mwidth;