mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-16 14:17:12 +02:00
Fixed count of current size for non-thumbed media with long bottom info.
This commit is contained in:
parent
5aba2f25cc
commit
cdd7ff5c6d
1 changed files with 13 additions and 4 deletions
|
@ -543,12 +543,21 @@ QSize Document::countCurrentSize(int newWidth) {
|
|||
if (!captioned && !hasTranscribe) {
|
||||
auto result = File::countCurrentSize(newWidth);
|
||||
if (isBubbleBottom()) {
|
||||
if (const auto link = thumbedLinkMaxWidth()) {
|
||||
const auto thumbedWidth = thumbedLinkMaxWidth();
|
||||
const auto statusWidth = thumbedWidth
|
||||
? 0
|
||||
: st::normalFont->width(_statusText);
|
||||
if (thumbedWidth || statusWidth) {
|
||||
const auto needed = st.padding.left()
|
||||
+ st.thumbSize
|
||||
+ st.thumbSkip
|
||||
+ link
|
||||
+ (thumbedWidth
|
||||
? st.thumbSize + st.thumbSkip
|
||||
: st::msgFileLayout.thumbSize
|
||||
+ st::mediaUnreadSkip)
|
||||
+ (thumbedWidth + statusWidth)
|
||||
+ st.thumbSkip
|
||||
+ (_realParent->hasUnreadMediaFlag()
|
||||
? st::mediaUnreadSkip + st::mediaUnreadSize
|
||||
: 0)
|
||||
+ _parent->bottomInfoFirstLineWidth()
|
||||
+ st.padding.right();
|
||||
if (result.width() < needed) {
|
||||
|
|
Loading…
Add table
Reference in a new issue