mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-17 22:57:11 +02:00
Fixed display of generic media with small width.
This commit is contained in:
parent
9e76e64064
commit
1a1e777b87
1 changed files with 7 additions and 1 deletions
|
@ -110,7 +110,13 @@ QSize MediaGeneric::countOptimalSize() {
|
|||
}
|
||||
|
||||
QSize MediaGeneric::countCurrentSize(int newWidth) {
|
||||
return { maxWidth(), minHeight() };
|
||||
if (newWidth > maxWidth()) {
|
||||
newWidth = maxWidth();
|
||||
}
|
||||
for (auto &entry : _entries) {
|
||||
entry.object->resizeGetHeight(newWidth);
|
||||
}
|
||||
return { newWidth, minHeight() };
|
||||
}
|
||||
|
||||
void MediaGeneric::draw(Painter &p, const PaintContext &context) const {
|
||||
|
|
Loading…
Add table
Reference in a new issue