Browse Source

add new logo for unknown sender

pull/130/head
DenioD 4 years ago
parent
commit
a2e68c9cc2
  1. 6
      application.qrc
  2. BIN
      res/getAddrBlack.png
  3. BIN
      res/getAddrWhite.png
  4. BIN
      res/unknownBlack.png
  5. BIN
      res/unknownWhite.png
  6. 7
      res/unlocked.svg
  7. BIN
      res/upload.png
  8. 8
      res/upload.svg
  9. 25
      src/chatmodel.cpp

6
application.qrc

@ -33,11 +33,7 @@
<file>res/add_contact.png</file>
<file>res/notification.png</file>
<file>res/rahmen-message.png</file>
<file>res/upload.png</file>
<file>res/upload.svg</file>
<file>res/message-icon.svg</file>
<file>res/lock.svg</file>
<file>res/lock.png</file>
<file>res/lock_green.png</file>
<file>res/lock_orange.png</file>
<file>res/unlocked.png</file>
@ -49,6 +45,8 @@
<file>res/sendBlack.png</file>
<file>res/requestBlack.png</file>
<file>res/addContactBlack.png</file>
<file>res/unknownBlack.png</file>
<file>res/unknownWhite.png</file>
</qresource>
<qresource prefix="/img">

BIN
res/getAddrBlack.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

BIN
res/getAddrWhite.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 12 KiB

BIN
res/unknownBlack.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

BIN
res/unknownWhite.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

7
res/unlocked.svg

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Svg Vector Icons : http://www.onlinewebfonts.com/icon -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg fill="#EB4F38" width="16px" height="16px" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata>
<g><g transform="translate(0.000000,512.000000) scale(0.100000,-0.100000)"><path d="M4631.2,5015.7c-634.2-57.5-1212.8-212.7-1755.1-475.2c-546.1-264.4-894.8-513.5-1339.3-959.9c-446.4-446.4-676.4-766.4-948.4-1322.1c-231.8-469.4-367.9-914-454.1-1465.8c-46-308.5-46-1032.7,1.9-1341.2c90.1-586.3,239.5-1057.6,488.6-1548.1c254.8-496.3,494.3-822,912-1239.7c438.8-440.7,764.5-674.4,1302.9-938.9c343-168.6,567.1-252.9,915.9-344.9c1452.4-383.2,2981.4-76.6,4209.5,839.2c233.8,176.3,756.8,699.3,933.1,933.1C9909.8-1493,10170.4,202.7,9610.9,1779.6c-168.6,475.2-484.8,1032.7-812.4,1437c-187.8,231.8-609.3,640-837.3,810.5C7286.8,4532.9,6530,4849,5685,4979.3C5491.5,5008.1,4817,5033,4631.2,5015.7z M5483.8,4622.9C7206.3,4450.5,8697,3264.5,9273.7,1605.2C9540,836.9,9593.7-44.5,9419.3-855c-176.3-818.1-615.1-1615.2-1224.3-2222.6c-714.7-716.6-1619-1159.2-2630.7-1293.3c-293.2-38.3-845-38.3-1138.1,0C2906.7-4171.6,1600-3240.4,933.2-1880.1c-320,651.4-461.8,1272.2-461.8,2013.8c0,730,139.9,1331.6,461.8,1990.8C1370.1,3015.4,2102,3747.3,2993,4184.2C3788.1,4571.2,4583.3,4713,5483.8,4622.9z"/><path d="M4589,2237.5c-431.1-103.5-768.3-486.7-814.3-927.4c-13.4-136,9.6-197.3,92-231.8c107.3-44.1,208.8,40.2,208.8,172.4c0,151.4,107.3,373.6,243.3,502c208.8,197.3,513.5,258.7,791.3,162.9c180.1-63.2,385.1-268.2,452.2-452.2c24.9-63.2,34.5-172.4,42.2-406.2l7.7-321.9H4431.9H3249.7l-46-47.9l-47.9-46v-1439v-1438.9l47.9-46l46-47.9h1592.2h1592.2l46,47.9l47.9,46v1438.9v1439l-47.9,46c-44.1,46-55.6,47.9-302.7,47.9h-258.7l-9.6,341c-7.7,287.4-15.3,358.3-49.8,457.9c-97.7,272.1-298.9,498.2-548,618.9C5068,2270.1,4832.3,2296.9,4589,2237.5z M6221.5-797.5v-1226.2H4841.9H3462.4v1226.2V428.8h1379.5h1379.5V-797.5z"/><path d="M4688.6,97.3c-36.4-11.5-111.1-65.2-162.9-118.8c-136-134.1-174.4-279.7-120.7-454.1c26.8-92,145.6-231.8,226.1-264.4l57.5-23v-402.4c0-398.5,0-400.4,47.9-446.4c61.3-63.2,149.4-63.2,210.8,0c47.9,46,47.9,47.9,47.9,446.4V-763l57.5,23c80.5,32.6,199.3,172.4,226.1,264.4c53.6,174.4,15.3,320-120.7,454.1C5023.9,114.5,4866.8,152.9,4688.6,97.3z M4947.3-232.3c95.8-93.9,28.7-258.7-105.4-258.7c-36.4,0-76.6,17.3-105.4,47.9c-30.7,28.7-47.9,69-47.9,105.4c0,36.4,17.2,76.6,47.9,105.4c28.7,30.7,69,47.9,105.4,47.9S4918.6-201.6,4947.3-232.3z"/></g></g>
</svg>

Before

Width:  |  Height:  |  Size: 2.7 KiB

BIN
res/upload.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

8
res/upload.svg

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 21.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 218.8 283.5" style="enable-background:new 0 0 218.8 283.5;" xml:space="preserve">
<g>
<path d="M109.4,0L0,109.4h62.5v93.8h93.8v-93.8h62.5L109.4,0z M0,234.4v31.3h218.8v-31.3H0z M0,234.4"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 476 B

25
src/chatmodel.cpp

@ -99,18 +99,39 @@ void MainWindow::renderContactRequest(){
requestContact.setupUi(&dialog);
Settings::saveRestore(&dialog);
QString icon;
auto theme = Settings::getInstance()->get_theme_name();
if (theme == "dark" || theme == "midnight") {
icon = ":/icons/res/unknownWhite.png";
}else{
icon = ":/icons/res/unknownBlack.png";
}
QPixmap unknownWhite(icon);
QIcon addnewAddrIcon(unknownWhite);
QStandardItemModel* contactRequest = new QStandardItemModel();
for (auto &c : DataStore::getChatDataStore()->getAllNewContactRequests())
{
QStandardItem* Items = new QStandardItem(c.second.getAddress());
QStandardItem* Items = new QStandardItem(QString("Unknown Sender"));
contactRequest->appendRow(Items);
requestContact.requestContact->setModel(contactRequest);
Items->setData(QIcon(addnewAddrIcon),Qt::DecorationRole);
requestContact.requestContact->setIconSize(QSize(40,50));
requestContact.requestContact->setUniformItemSizes(true);
requestContact.requestContact->show();
requestContact.zaddrnew->setVisible(false);
requestContact.zaddrnew->setText(c.second.getAddress());
}
QStandardItemModel* contactRequestOld = new QStandardItemModel();
@ -137,7 +158,7 @@ void MainWindow::renderContactRequest(){
QString label_contact = index.data(Qt::DisplayRole).toString();
QStandardItemModel* contactMemo = new QStandardItemModel();
if ((c.second.isOutgoing() == false) && (label_contact == c.second.getAddress()) && (c.second.getType() != "Cont"))
if ((c.second.isOutgoing() == false) && (requestContact.zaddrnew->text() == c.second.getAddress()) && (c.second.getType() != "Cont"))
{

Loading…
Cancel
Save