mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
FileTransferInstance: return of the edges
This commit is contained in:
parent
2ebc583f29
commit
300d045dd9
|
@ -391,10 +391,33 @@ QString FileTransferInstance::draw2ButtonsForm(const QString &type, const QImage
|
||||||
|
|
||||||
QString FileTransferInstance::wrapIntoForm(const QString& content, const QString &type, const QString &imgAstr, const QString &imgBstr)
|
QString FileTransferInstance::wrapIntoForm(const QString& content, const QString &type, const QString &imgAstr, const QString &imgBstr)
|
||||||
{
|
{
|
||||||
QString res;
|
QString w = QString::number(QImage(":/ui/fileTransferInstance/emptyLRedFileButton.png").size().width());
|
||||||
|
QString imgLeftA, imgLeftB;
|
||||||
|
|
||||||
|
if (type == "green")
|
||||||
|
{
|
||||||
|
imgLeftA = "<img src=\"data:placeholder/png;base64," + QImage2base64(QImage(":/ui/fileTransferInstance/emptyLGreenFileButton.png").mirrored(true,false)) + "\">";
|
||||||
|
imgLeftB = "<img src=\"data:placeholder/png;base64," + QImage2base64(QImage(":/ui/fileTransferInstance/emptyLGreenFileButton.png").mirrored(true,true)) + "\">";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (type == "silver")
|
||||||
|
{
|
||||||
|
imgLeftA = "<img src=\"data:placeholder/png;base64," + QImage2base64(QImage(":/ui/fileTransferInstance/sliverRTEdge.png").mirrored(true,false)) + "\">";
|
||||||
|
imgLeftB = "<img src=\"data:placeholder/png;base64," + QImage2base64(QImage(":/ui/fileTransferInstance/sliverRTEdge.png").mirrored(true,true)) + "\">";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (type == "red")
|
||||||
|
{
|
||||||
|
imgLeftA = "<img src=\"data:placeholder/png;base64," + QImage2base64(QImage(":/ui/fileTransferInstance/emptyLRedFileButton.png").mirrored(true,false)) + "\">";
|
||||||
|
imgLeftB = "<img src=\"data:placeholder/png;base64," + QImage2base64(QImage(":/ui/fileTransferInstance/emptyLRedFileButton.png").mirrored(true,true)) + "\">";
|
||||||
|
}
|
||||||
|
|
||||||
|
QString res;
|
||||||
res = "<table cellspacing=\"0\">\n";
|
res = "<table cellspacing=\"0\">\n";
|
||||||
res += "<tr valign=middle>\n";
|
res += "<tr valign=middle>\n";
|
||||||
|
res += "<td width=" + w + ">\n";
|
||||||
|
res += "<div class=button>" + imgLeftA + "<br>" + imgLeftB + "</div>\n";
|
||||||
|
res += "</td>\n";
|
||||||
res += insertMiniature(type);
|
res += insertMiniature(type);
|
||||||
res += "<td width=" + QString::number(CONTENT_WIDTH + 30) + ">\n";
|
res += "<td width=" + QString::number(CONTENT_WIDTH + 30) + ">\n";
|
||||||
res += "<div class=" + type + ">";
|
res += "<div class=" + type + ">";
|
||||||
|
|
1
res.qrc
1
res.qrc
|
@ -146,5 +146,6 @@
|
||||||
<file>img/avatar_mask.png</file>
|
<file>img/avatar_mask.png</file>
|
||||||
<file>img/group_2x.png</file>
|
<file>img/group_2x.png</file>
|
||||||
<file>ui/chatroomWidgets/genericChatroomWidget.css</file>
|
<file>ui/chatroomWidgets/genericChatroomWidget.css</file>
|
||||||
|
<file>ui/fileTransferInstance/sliverRTEdge.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
BIN
ui/fileTransferInstance/sliverRTEdge.png
Normal file
BIN
ui/fileTransferInstance/sliverRTEdge.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 225 B |
Loading…
Reference in New Issue
Block a user