mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +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) {
|
if (!captioned && !hasTranscribe) {
|
||||||
auto result = File::countCurrentSize(newWidth);
|
auto result = File::countCurrentSize(newWidth);
|
||||||
if (isBubbleBottom()) {
|
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()
|
const auto needed = st.padding.left()
|
||||||
+ st.thumbSize
|
+ (thumbedWidth
|
||||||
+ st.thumbSkip
|
? st.thumbSize + st.thumbSkip
|
||||||
+ link
|
: st::msgFileLayout.thumbSize
|
||||||
|
+ st::mediaUnreadSkip)
|
||||||
|
+ (thumbedWidth + statusWidth)
|
||||||
+ st.thumbSkip
|
+ st.thumbSkip
|
||||||
|
+ (_realParent->hasUnreadMediaFlag()
|
||||||
|
? st::mediaUnreadSkip + st::mediaUnreadSize
|
||||||
|
: 0)
|
||||||
+ _parent->bottomInfoFirstLineWidth()
|
+ _parent->bottomInfoFirstLineWidth()
|
||||||
+ st.padding.right();
|
+ st.padding.right();
|
||||||
if (result.width() < needed) {
|
if (result.width() < needed) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue