1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

FileTransferInstance improvements

This commit is contained in:
apprb 2014-10-24 00:39:55 +09:00
parent d92bad3f9c
commit 0a6342ae98
No known key found for this signature in database
GPG Key ID: B001911B5B22FB9B

View File

@ -46,7 +46,7 @@ FileTransferInstance::FileTransferInstance(ToxFile File)
filenameElided = fm.elidedText(filename, Qt::ElideRight, MAX_CONTENT_WIDTH);
size = getHumanReadableSize(File.filesize);
contentPrefWidth = std::max(fm.boundingRect(filenameElided).width(), fm.width(size));
contentPrefWidth = std::max(fm.width(filenameElided), fm.width(size)) + fm.leading();
speed = "0B/s";
eta = "00:00";
@ -401,6 +401,8 @@ QString FileTransferInstance::insertMiniature(const QString &type)
res = "<td><div class=" + type + ">\n";
res += "<img src=\"data:mini." + widgetId + "/png;base64," + QImage2base64(pic) + "\">";
res += "</div></td>\n";
res += "<td width=5><div class=" + type + ">\n";
res += "</div></td>\n";
return res;
}