mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-05-07 14:44:01 +00:00
Fix factor computation to detect non-standard size for a thumbnail.
This commit is contained in:
parent
33b77dcdce
commit
0d00704e44
3 changed files with 3 additions and 3 deletions
|
|
@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
### Fixed
|
||||
- Fix using only username in URI handlers.
|
||||
- Chat flickering on load.
|
||||
- Portait thumbnails.
|
||||
- Color of busy indicator when the chat is loading.
|
||||
- Incoming ephemerals weren't removed without reloading chat rooms.
|
||||
- Update SDK to 5.2.42
|
||||
|
|
|
|||
|
|
@ -184,9 +184,9 @@ void ContentModel::createThumbnail (const bool& force) {
|
|||
QPainter painter(&image);
|
||||
painter.drawImage(0, 0, originalImage);
|
||||
//--------------------
|
||||
double factor = image.width() / image.height();
|
||||
double factor = image.width() / (double)image.height();
|
||||
if(factor < 0.2 || factor > 5){
|
||||
qInfo() << QStringLiteral("Cannot create thumbnails because size factor is too low/much of: `%1`.").arg(path);
|
||||
qInfo() << QStringLiteral("Cannot create thumbnails because size factor (%1) is too low/much of: `%2`.").arg(factor).arg(path);
|
||||
}else {
|
||||
QImage thumbnail = image.scaled(
|
||||
Constants::ThumbnailImageFileWidth, Constants::ThumbnailImageFileHeight,
|
||||
|
|
|
|||
|
|
@ -651,7 +651,6 @@ ColumnLayout {
|
|||
}
|
||||
}
|
||||
chatRoomModel: conversation.chatRoomModel
|
||||
peerAddress: conversation.peerAddress
|
||||
fullPeerAddress: conversation.fullPeerAddress
|
||||
fullLocalAddress: conversation.fullLocalAddress
|
||||
localAddress: conversation.localAddress// Reload is done on localAddress. Use this order
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue