mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-08-10 13:43:54 +00:00
Fix webpage with attach maxWidth.
This commit is contained in:
@@ -124,10 +124,9 @@ QSize Game::countOptimalSize() {
|
||||
|
||||
_attach->initDimensions();
|
||||
QMargins bubble(_attach->bubbleMargins());
|
||||
auto maxMediaWidth = _attach->maxWidth() - bubble.left() - bubble.right();
|
||||
if (isBubbleBottom() && _attach->customInfoLayout()) {
|
||||
maxMediaWidth += skipBlockWidth;
|
||||
}
|
||||
const auto maxMediaWidth = _attach->maxWidth()
|
||||
- bubble.left()
|
||||
- bubble.right();
|
||||
accumulate_max(maxWidth, maxMediaWidth);
|
||||
minHeight += _attach->minHeight() - bubble.top() - bubble.bottom();
|
||||
}
|
||||
|
||||
@@ -733,10 +733,8 @@ QSize WebPage::countOptimalSize() {
|
||||
|
||||
_attach->initDimensions();
|
||||
const auto bubble = _attach->bubbleMargins();
|
||||
auto maxMediaWidth = _attach->maxWidth() - rect::m::sum::h(bubble);
|
||||
if (isBubbleBottom() && _attach->customInfoLayout()) {
|
||||
maxMediaWidth += skipBlockWidth;
|
||||
}
|
||||
const auto maxMediaWidth = _attach->maxWidth()
|
||||
- rect::m::sum::h(bubble);
|
||||
accumulate_max(maxWidth, maxMediaWidth);
|
||||
minHeight += _attach->minHeight() - rect::m::sum::v(bubble);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user