Size images/videos by timeline width

This commit is contained in:
Nicolas Werner 2019-10-09 00:36:03 +02:00
parent d90038cf20
commit 8ebef4eed2
6 changed files with 46 additions and 12 deletions

View file

@ -38,7 +38,8 @@ MxcImageResponse::run()
auto data = QByteArray(res.data(), res.size());
cache::client()->saveImage(fileName, data);
m_image.loadFromData(data);
m_image = m_image.scaled(m_requestedSize, Qt::KeepAspectRatio);
m_image = m_image.scaled(
m_requestedSize, Qt::KeepAspectRatio, Qt::SmoothTransformation);
m_image.setText("mxc url", "mxc://" + m_id);
emit finished();