mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-18 07:07:08 +02:00
Fix layout of webpage preview with a sticker with small height.
This commit is contained in:
parent
55eb381bd2
commit
d0cb387c6e
1 changed files with 5 additions and 3 deletions
|
@ -77,7 +77,8 @@ QSize UnwrappedMedia::countOptimalSize() {
|
|||
QSize UnwrappedMedia::countCurrentSize(int newWidth) {
|
||||
const auto item = _parent->data();
|
||||
accumulate_min(newWidth, maxWidth());
|
||||
if (_parent->media() == this) {
|
||||
const auto isPageAttach = (_parent->media() != this);
|
||||
if (!isPageAttach) {
|
||||
const auto via = item->Get<HistoryMessageVia>();
|
||||
const auto reply = _parent->displayedReply();
|
||||
const auto forwarded = getDisplayedForwardedInfo();
|
||||
|
@ -93,8 +94,9 @@ QSize UnwrappedMedia::countCurrentSize(int newWidth) {
|
|||
}
|
||||
}
|
||||
auto newHeight = minHeight();
|
||||
if (_parent->hasOutLayout()
|
||||
&& !_parent->delegate()->elementIsChatWide()) {
|
||||
if (!isPageAttach
|
||||
&& _parent->hasOutLayout()
|
||||
&& !_parent->delegate()->elementIsChatWide()) {
|
||||
// Add some height to isolated emoji for the timestamp info.
|
||||
const auto infoHeight = st::msgDateImgPadding.y() * 2
|
||||
+ st::msgDateFont->height;
|
||||
|
|
Loading…
Add table
Reference in a new issue