mirror of
https://github.com/vale981/tdesktop
synced 2025-03-05 09:41:41 -05:00
Resize message with photo when bubbled
This commit is contained in:
parent
4669c07dc5
commit
982edcb310
2 changed files with 3 additions and 2 deletions
|
@ -371,6 +371,7 @@ botKbScroll: defaultSolidScroll;
|
|||
historyDateFadeDuration: 200;
|
||||
|
||||
historyPhotoLeft: 14px;
|
||||
historyPhotoBubbleMinWidth: 200px;
|
||||
historyMessageRadius: roundRadiusLarge;
|
||||
historyBubbleTailInLeft: icon {{ "bubble_tail", msgInBg }};
|
||||
historyBubbleTailInLeftSelected: icon {{ "bubble_tail", msgInBgSelected }};
|
||||
|
|
|
@ -87,7 +87,7 @@ QSize Photo::countOptimalSize() {
|
|||
if (_serviceWidth > 0) {
|
||||
return { _serviceWidth, _serviceWidth };
|
||||
}
|
||||
const auto minWidth = qMax(st::minPhotoSize, _parent->infoWidth() + 2 * (st::msgDateImgDelta + st::msgDateImgPadding.x()));
|
||||
const auto minWidth = qMax((_parent->hasBubble() ? st::historyPhotoBubbleMinWidth : st::minPhotoSize), _parent->infoWidth() + 2 * (st::msgDateImgDelta + st::msgDateImgPadding.x()));
|
||||
const auto maxActualWidth = qMax(tw, minWidth);
|
||||
maxWidth = qMax(maxActualWidth, th);
|
||||
minHeight = qMax(th, st::minPhotoSize);
|
||||
|
@ -127,7 +127,7 @@ QSize Photo::countCurrentSize(int newWidth) {
|
|||
if (_pixw < 1) _pixw = 1;
|
||||
if (_pixh < 1) _pixh = 1;
|
||||
|
||||
auto minWidth = qMax(st::minPhotoSize, _parent->infoWidth() + 2 * (st::msgDateImgDelta + st::msgDateImgPadding.x()));
|
||||
auto minWidth = qMax((_parent->hasBubble() ? st::historyPhotoBubbleMinWidth : st::minPhotoSize), _parent->infoWidth() + 2 * (st::msgDateImgDelta + st::msgDateImgPadding.x()));
|
||||
newWidth = qMax(_pixw, minWidth);
|
||||
auto newHeight = qMax(_pixh, st::minPhotoSize);
|
||||
if (_parent->hasBubble() && !_caption.isEmpty()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue