mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix layout of round video messages.
This commit is contained in:
parent
93a88b54ad
commit
dcebefe2bb
1 changed files with 2 additions and 2 deletions
|
@ -155,11 +155,11 @@ QSize Gif::countOptimalSize() {
|
||||||
_thumbh = th;
|
_thumbh = th;
|
||||||
auto maxWidth = qMax(tw, st::minPhotoSize);
|
auto maxWidth = qMax(tw, st::minPhotoSize);
|
||||||
auto minHeight = qMax(th, st::minPhotoSize);
|
auto minHeight = qMax(th, st::minPhotoSize);
|
||||||
accumulate_max(maxWidth, _parent->minWidthForMedia());
|
|
||||||
if (!activeCurrentStreamed()) {
|
if (!activeCurrentStreamed()) {
|
||||||
accumulate_max(maxWidth, gifMaxStatusWidth(_data) + 2 * (st::msgDateImgDelta + st::msgDateImgPadding.x()));
|
accumulate_max(maxWidth, gifMaxStatusWidth(_data) + 2 * (st::msgDateImgDelta + st::msgDateImgPadding.x()));
|
||||||
}
|
}
|
||||||
if (_parent->hasBubble()) {
|
if (_parent->hasBubble()) {
|
||||||
|
accumulate_max(maxWidth, _parent->minWidthForMedia());
|
||||||
if (!_caption.isEmpty()) {
|
if (!_caption.isEmpty()) {
|
||||||
auto captionw = maxWidth - st::msgPadding.left() - st::msgPadding.right();
|
auto captionw = maxWidth - st::msgPadding.left() - st::msgPadding.right();
|
||||||
minHeight += st::mediaCaptionSkip + _caption.countHeight(captionw);
|
minHeight += st::mediaCaptionSkip + _caption.countHeight(captionw);
|
||||||
|
@ -212,11 +212,11 @@ QSize Gif::countCurrentSize(int newWidth) {
|
||||||
|
|
||||||
newWidth = qMax(tw, st::minPhotoSize);
|
newWidth = qMax(tw, st::minPhotoSize);
|
||||||
auto newHeight = qMax(th, st::minPhotoSize);
|
auto newHeight = qMax(th, st::minPhotoSize);
|
||||||
accumulate_max(newWidth, _parent->minWidthForMedia());
|
|
||||||
if (!activeCurrentStreamed()) {
|
if (!activeCurrentStreamed()) {
|
||||||
accumulate_max(newWidth, gifMaxStatusWidth(_data) + 2 * (st::msgDateImgDelta + st::msgDateImgPadding.x()));
|
accumulate_max(newWidth, gifMaxStatusWidth(_data) + 2 * (st::msgDateImgDelta + st::msgDateImgPadding.x()));
|
||||||
}
|
}
|
||||||
if (_parent->hasBubble()) {
|
if (_parent->hasBubble()) {
|
||||||
|
accumulate_max(newWidth, _parent->minWidthForMedia());
|
||||||
if (!_caption.isEmpty()) {
|
if (!_caption.isEmpty()) {
|
||||||
auto captionw = newWidth - st::msgPadding.left() - st::msgPadding.right();
|
auto captionw = newWidth - st::msgPadding.left() - st::msgPadding.right();
|
||||||
newHeight += st::mediaCaptionSkip + _caption.countHeight(captionw);
|
newHeight += st::mediaCaptionSkip + _caption.countHeight(captionw);
|
||||||
|
|
Loading…
Add table
Reference in a new issue