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

filetransfer: original buttons positions

This commit is contained in:
apprb 2014-09-07 23:14:06 +07:00
parent aa2f67c983
commit f0b34dc40d
10 changed files with 9 additions and 12 deletions

View File

@ -44,7 +44,7 @@ FileTransferInstance::FileTransferInstance(ToxFile File)
File.file->seek(0);
if (preview.loadFromData(File.file->readAll()))
{
pic = preview.scaledToHeight(40);
pic = preview.scaledToHeight(50);
}
File.file->seek(0);
}
@ -113,7 +113,7 @@ void FileTransferInstance::onFileTransferFinished(ToxFile File)
{
if (preview.loadFromData(previewFile.readAll()))
{
pic = preview.scaledToHeight(40);
pic = preview.scaledToHeight(50);
}
previewFile.close();
}
@ -280,7 +280,7 @@ QString FileTransferInstance::drawButtonlessForm(const QString &type)
return wrapIntoForm(content, type, imgAStr, imgBStr);
}
QString FileTransferInstance::insertMiniature()
QString FileTransferInstance::insertMiniature(const QString &type)
{
if (pic == QImage())
return QString();
@ -288,9 +288,9 @@ QString FileTransferInstance::insertMiniature()
QString widgetId = QString::number(getId());
QString res;
res = "<td>\n";
res = "<td><div class=" + type + ">\n";
res += "<img src=\"data:mini." + widgetId + "/png;base64," + QImage2base64(pic) + "\">";
res += "</td>\n";
res += "</div></td>\n";
return res;
}
@ -311,19 +311,16 @@ QString FileTransferInstance::wrapIntoForm(const QString& content, const QString
{
QString res;
res = "<table widht=100% cellspacing=\"1\">\n";
res = "<table widht=100% cellspacing=\"0\">\n";
res += "<tr valign=middle>\n";
res += "<td>\n";
res += "<div class=button>" + imgAstr + "</div>\n";
res += "</td>\n";
res += insertMiniature();
res += insertMiniature(type);
res += "<td width=100%>\n";
res += "<div class=" + type + ">";
res += content;
res += "</div>\n";
res += "</td>\n";
res += "<td>\n";
res += "<div class=button>" + imgBstr + "</div>\n";
res += "<div class=button>" + imgAstr + "<br>" + imgBstr+ "</div>\n";
res += "</td>\n";
res += "</tr>\n";
res += "</table>\n";

View File

@ -57,7 +57,7 @@ private:
QString QImage2base64(const QImage &img);
QString drawButtonlessForm(const QString &type);
QString draw2ButtonsForm(const QString &type, const QImage &imgA, const QImage &imgB);
QString insertMiniature();
QString insertMiniature(const QString &type);
QString wrapIntoForm(const QString &content, const QString &type, const QString &imgAstr, const QString &imgBstr);
private:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 490 B

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 B

After

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 258 B

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 B

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 B

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 353 B

After

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 273 B

After

Width:  |  Height:  |  Size: 244 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 557 B

After

Width:  |  Height:  |  Size: 516 B