mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-09-08 04:53:09 +02:00
parent
64184e6c90
commit
a746b7abcf
1 changed files with 7 additions and 8 deletions
|
@ -463,9 +463,6 @@ QSize Service::performCountCurrentSize(int newWidth) {
|
||||||
const auto media = this->media();
|
const auto media = this->media();
|
||||||
const auto mediaDisplayed = media && media->isDisplayed();
|
const auto mediaDisplayed = media && media->isDisplayed();
|
||||||
auto contentWidth = newWidth;
|
auto contentWidth = newWidth;
|
||||||
if (mediaDisplayed && media->hideServiceText()) {
|
|
||||||
newHeight += media->resizeGetHeight(newWidth) + marginBottom();
|
|
||||||
} else if (!text().isEmpty()) {
|
|
||||||
if (delegate()->elementChatMode() == ElementChatMode::Wide) {
|
if (delegate()->elementChatMode() == ElementChatMode::Wide) {
|
||||||
accumulate_min(contentWidth, st::msgMaxWidth + 2 * st::msgPhotoSkip + 2 * st::msgMargin.left());
|
accumulate_min(contentWidth, st::msgMaxWidth + 2 * st::msgPhotoSkip + 2 * st::msgMargin.left());
|
||||||
}
|
}
|
||||||
|
@ -473,7 +470,9 @@ QSize Service::performCountCurrentSize(int newWidth) {
|
||||||
if (contentWidth < st::msgServicePadding.left() + st::msgServicePadding.right() + 1) {
|
if (contentWidth < st::msgServicePadding.left() + st::msgServicePadding.right() + 1) {
|
||||||
contentWidth = st::msgServicePadding.left() + st::msgServicePadding.right() + 1;
|
contentWidth = st::msgServicePadding.left() + st::msgServicePadding.right() + 1;
|
||||||
}
|
}
|
||||||
|
if (mediaDisplayed && media->hideServiceText()) {
|
||||||
|
newHeight += media->resizeGetHeight(newWidth) + marginBottom();
|
||||||
|
} else if (!text().isEmpty()) {
|
||||||
auto nwidth = qMax(contentWidth - st::msgServicePadding.left() - st::msgServicePadding.right(), 0);
|
auto nwidth = qMax(contentWidth - st::msgServicePadding.left() - st::msgServicePadding.right(), 0);
|
||||||
newHeight += (contentWidth >= maxWidth())
|
newHeight += (contentWidth >= maxWidth())
|
||||||
? minHeight()
|
? minHeight()
|
||||||
|
|
Loading…
Add table
Reference in a new issue