mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Fix reactions layout under a media.
This commit is contained in:
parent
7ef44fb621
commit
24a7e48b75
1 changed files with 8 additions and 6 deletions
|
@ -890,12 +890,13 @@ QSize Message::performCountOptimalSize() {
|
||||||
accumulate_max(
|
accumulate_max(
|
||||||
maxWidth,
|
maxWidth,
|
||||||
std::min(st::msgMaxWidth, reactionsMaxWidth));
|
std::min(st::msgMaxWidth, reactionsMaxWidth));
|
||||||
if (!mediaDisplayed || _viewButton) {
|
if (mediaDisplayed
|
||||||
minHeight += st::mediaInBubbleSkip;
|
&& !media->additionalInfoString().isEmpty()) {
|
||||||
} else if (!media->additionalInfoString().isEmpty()) {
|
|
||||||
// In round videos in a web page status text is painted
|
// In round videos in a web page status text is painted
|
||||||
// in the bottom left corner, reactions should be below.
|
// in the bottom left corner, reactions should be below.
|
||||||
minHeight += st::msgDateFont->height;
|
minHeight += st::msgDateFont->height;
|
||||||
|
} else {
|
||||||
|
minHeight += st::mediaInBubbleSkip;
|
||||||
}
|
}
|
||||||
if (maxWidth >= reactionsMaxWidth) {
|
if (maxWidth >= reactionsMaxWidth) {
|
||||||
minHeight += _reactions->minHeight();
|
minHeight += _reactions->minHeight();
|
||||||
|
@ -4339,12 +4340,13 @@ int Message::resizeContentGetHeight(int newWidth) {
|
||||||
newHeight += entry->resizeGetHeight(contentWidth);
|
newHeight += entry->resizeGetHeight(contentWidth);
|
||||||
}
|
}
|
||||||
if (reactionsInBubble) {
|
if (reactionsInBubble) {
|
||||||
if (!mediaDisplayed || _viewButton) {
|
if (mediaDisplayed
|
||||||
newHeight += st::mediaInBubbleSkip;
|
&& !media->additionalInfoString().isEmpty()) {
|
||||||
} else if (!media->additionalInfoString().isEmpty()) {
|
|
||||||
// In round videos in a web page status text is painted
|
// In round videos in a web page status text is painted
|
||||||
// in the bottom left corner, reactions should be below.
|
// in the bottom left corner, reactions should be below.
|
||||||
newHeight += st::msgDateFont->height;
|
newHeight += st::msgDateFont->height;
|
||||||
|
} else {
|
||||||
|
newHeight += st::mediaInBubbleSkip;
|
||||||
}
|
}
|
||||||
newHeight += _reactions->height();
|
newHeight += _reactions->height();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue