Browse Source

new Button Design, only for darkmode atm

pull/130/head
DenioD 4 years ago
parent
commit
6991743b5f
  1. 9
      application.qrc
  2. BIN
      res/add_contact.png
  3. 9
      res/add_contact.svg
  4. 7
      res/addcontact.svg
  5. BIN
      res/notification.png
  6. 10
      res/notification.svg
  7. BIN
      res/send-new-white.png
  8. 19
      res/send-new.svg
  9. BIN
      res/send.png
  10. 6
      res/send.svg
  11. 8
      src/controller.cpp
  12. 18
      src/mainwindow.cpp
  13. 113
      src/mainwindow.ui

9
application.qrc

@ -23,6 +23,15 @@
<file>res/Pinguin.png</file>
<file>res/Stag.png</file>
<file>res/Elsa.png</file>
<file>res/send.png</file>
<file>res/send.svg</file>
<file>res/addcontact.svg</file>
<file>res/send-new.svg</file>
<file>res/add_contact.svg</file>
<file>res/notification.svg</file>
<file>res/send-new-white.png</file>
<file>res/add_contact.png</file>
<file>res/notification.png</file>
</qresource>
<qresource prefix="/img">
<file>res/hushdlogo.gif</file>

BIN
res/add_contact.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

9
res/add_contact.svg

@ -0,0 +1,9 @@
<?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 265.7 283.5" style="enable-background:new 0 0 265.7 283.5;" xml:space="preserve">
<g>
<path d="M132.9,0C59.8,0,0,59.8,0,132.9c0,73,59.8,132.9,132.9,132.9c73,0,132.9-59.8,132.9-132.9C265.7,59.8,205.9,0,132.9,0
L132.9,0z M199.3,146.2h-53.1v53.1h-26.6v-53.1H66.4v-26.6h53.1V66.4h26.6v53.1h53.1V146.2z M199.3,146.2"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 604 B

7
res/addcontact.svg

@ -0,0 +1,7 @@
<?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 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><path d="M870.2,797.3l-99.5-2.4l2.4-99.7c0.4-15.7-12.1-28.8-27.8-29.2c-15.7-0.4-28.8,12-29.2,27.8l-2.4,99.7l-99.6-2.4c-15.7-0.4-28.8,12.1-29.2,27.8c-0.4,15.7,12,28.8,27.8,29.2l99.6,2.4l-2.4,99.7c-0.4,15.7,12,28.8,27.8,29.2c15.7,0.4,28.8-12,29.2-27.8l2.4-99.6l99.5,2.4c15.6,0.4,28.8-12,29.2-27.8C898.3,810.8,885.9,797.7,870.2,797.3L870.2,797.3z"/><path d="M515.1,568.6c2.2,15.9,16.9,27.1,32.7,25.1c117.1-14.5,232.6,25.5,316.9,109.9c11.4,11.4,29.8,11.5,41.1,0.3c11.3-11.2,11.2-29.7-0.3-41.1C808.3,565.4,675,519.2,539.9,536C524.4,538,512.9,553.1,515.1,568.6z M113.8,990c15.9,0.5,29.2-12.2,29.7-28.4c6.3-209.1,178.4-374.1,383.6-367.9c158.1,4.8,290.6-122.2,295.5-283.1c4.8-160.9-119.8-295.7-277.9-300.5C386.6,5.4,254.1,132.4,249.2,293.3c-3.2,106.5,52.2,207,142.4,260.6C216.3,608.1,91.5,772.7,85.8,959.9C85.3,976,97.9,989.5,113.8,990z M542.9,68.8c126.3,3.8,225.8,111.5,221.9,240.1C761,437.5,655.2,539,528.9,535.1c-126.2-3.8-225.6-111.5-221.8-240.1C311,166.6,416.8,65.1,542.9,68.8z"/></g>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
res/notification.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

10
res/notification.svg

@ -0,0 +1,10 @@
<?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 225.9 283.5" style="enable-background:new 0 0 225.9 283.5;" xml:space="preserve">
<g>
<path d="M113,265.7c14.6,0,26.5-11.9,26.5-26.6H86.4C86.4,253.8,98.4,265.7,113,265.7L113,265.7z M199.3,186v-73
c0-41.2-27.9-74.4-66.4-83.7v-9.4C132.9,9.3,123.6,0,113,0C102.3,0,93,9.3,93,19.9v9.4C54.5,38.5,26.6,71.8,26.6,113v73L0,212.6
v13.3h225.9v-13.3L199.3,186z M199.3,186"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 655 B

BIN
res/send-new-white.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

19
res/send-new.svg

@ -0,0 +1,19 @@
<?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 300.2 283.5" style="enable-background:new 0 0 300.2 283.5;" xml:space="preserve">
<!--<style type="text/css">-->
<!--.st0{clip-path:url(#SVGID_2_);}-->
<!--</style>-->
<g>
<!--<g>-->
<!--<defs>-->
<!--<rect id="SVGID_1_" x="2.6" width="297.6" height="265.7"/>-->
<!--</defs>-->
<!--<clipPath id="SVGID_2_">-->
<!--<use xlink:href="#SVGID_1_" style="overflow:visible;"/>-->
<!--</clipPath>-->
<path class="st0" d="M2.6,255.1l297.7-127.5L2.6,0v99.2l212.6,28.3L2.6,155.9V255.1z M2.6,255.1"/>
<!--</g>-->
</g>
</svg>

After

Width:  |  Height:  |  Size: 808 B

BIN
res/send.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

6
res/send.svg

@ -0,0 +1,6 @@
<?xml version="1.0" ?><svg id="Layer_1" style="enable-background:new 0 0 137.3 139.3;" version="1.1" viewBox="0 0 137.3 139.3" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><style type="text/css">
.st0{fill:#2C8AAA;}
.st1{opacity:0.19;clip-path:url(#XMLID_39_);fill:#070808;}
.st2{fill:#FFFFFF;}
.st3{opacity:0.19;fill:#070808;}
</style><g id="XMLID_2671_"><g id="XMLID_2704_"><circle class="st0" cx="68.5" cy="69.6" id="XMLID_2708_" r="66.2"/><g id="XMLID_2705_"><defs><circle cx="68.7" cy="69.6" id="XMLID_2706_" r="66.2"/></defs><clipPath id="XMLID_39_"><use style="overflow:visible;" xlink:href="#XMLID_2706_"/></clipPath><polyline class="st1" id="XMLID_2707_" points="95.7,41 155.1,91.1 134,135.8 112,146.2 33.3,62.9 "/></g></g></g><g id="XMLID_2719_"><polygon class="st2" id="XMLID_2718_" points="74.3,103.9 95.7,41 33.3,62.9 50.9,76.8 60.4,76.8 60.3,86.1 "/><polygon class="st3" id="XMLID_2713_" points="60.7,84.9 95.7,41 50.9,76.8 60.4,76.8 "/><polygon class="st3" id="XMLID_2703_" points="60.4,76.8 95.7,41 60.3,86.1 "/></g></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

8
src/controller.cpp

@ -874,7 +874,7 @@ void Controller::refreshTransactions() {
if (address == c.getPartnerAddress()){
contact = c.getName();
}else{ contact = "";}
}
ChatItem item = ChatItem(
datetime,
@ -889,7 +889,7 @@ void Controller::refreshTransactions() {
);
chatModel->addMessage(item);
}
items.push_back(TransactionItemDetail{address, amount, memo});
total_amount = total_amount + amount;
@ -980,7 +980,7 @@ void Controller::refreshTransactions() {
contact = c.getName();
}else{ contact = "";}
}
ChatItem item = ChatItem(
datetime,
address,
@ -994,7 +994,7 @@ void Controller::refreshTransactions() {
);
chatModel->addMessage(item);
}
}
}

18
src/mainwindow.cpp

@ -1013,12 +1013,12 @@ void MainWindow::setupchatTab() {
// if (ui->request->isChecked()) {
QObject::connect(ui->sendChatButton, &QPushButton::clicked, this, &MainWindow::ContactRequest);
// QObject::connect(ui->sendChatButton, &QPushButton::clicked, this, &MainWindow::ContactRequest);
// qDebug() <<ui->request->isChecked()->text();
// }else{
// QObject::connect(ui->sendChatButton, &QPushButton::clicked, this, &MainWindow::sendChatButton);
QObject::connect(ui->sendChatButton, &QPushButton::clicked, this, &MainWindow::sendChatButton);
// }
@ -1048,20 +1048,6 @@ void MainWindow::setupchatTab() {
}
/*
void MainWindow::setChatItem(ChatItem * item)
{
this->currentChatItem = item;
}
ChatItem* MainWindow::getChatItem()
{
return this->currentChatItem;
}*/
ChatMemoEdit::ChatMemoEdit(QWidget* parent) : QPlainTextEdit(parent) {
QObject::connect(this, &QPlainTextEdit::textChanged, this, &ChatMemoEdit::updateDisplay);
}

113
src/mainwindow.ui

@ -1332,9 +1332,9 @@
<property name="geometry">
<rect>
<x>0</x>
<y>40</y>
<y>90</y>
<width>341</width>
<height>601</height>
<height>551</height>
</rect>
</property>
<property name="mouseTracking">
@ -1354,7 +1354,7 @@
<property name="geometry">
<rect>
<x>0</x>
<y>20</y>
<y>60</y>
<width>341</width>
<height>20</height>
</rect>
@ -1392,10 +1392,10 @@
<widget class="QPushButton" name="sendChatButton">
<property name="geometry">
<rect>
<x>720</x>
<y>640</y>
<width>114</width>
<height>25</height>
<x>1170</x>
<y>560</y>
<width>91</width>
<height>81</height>
</rect>
</property>
<property name="baseSize">
@ -1404,33 +1404,28 @@
<height>0</height>
</size>
</property>
<property name="text">
<string>Send</string>
</property>
<property name="flat">
<property name="autoFillBackground">
<bool>false</bool>
</property>
</widget>
<widget class="QPushButton" name="safeContactRequest">
<property name="geometry">
<rect>
<x>0</x>
<y>640</y>
<width>91</width>
<height>25</height>
</rect>
<property name="text">
<string/>
</property>
<property name="baseSize">
<property name="icon">
<iconset>
<normalon>:/icons/res/send-new-white.png</normalon>
</iconset>
</property>
<property name="iconSize">
<size>
<width>100</width>
<height>0</height>
<width>61</width>
<height>62</height>
</size>
</property>
<property name="text">
<string>Add contact</string>
<property name="default">
<bool>false</bool>
</property>
<property name="flat">
<bool>false</bool>
<bool>true</bool>
</property>
</widget>
<widget class="QLabel" name="contactNameMemo_3">
@ -1484,7 +1479,7 @@
<property name="geometry">
<rect>
<x>340</x>
<y>650</y>
<y>640</y>
<width>261</width>
<height>23</height>
</rect>
@ -1493,17 +1488,71 @@
<string>Is this message a contact request?</string>
</property>
</widget>
<widget class="QPushButton" name="safeContactRequest">
<property name="geometry">
<rect>
<x>90</x>
<y>0</y>
<width>71</width>
<height>61</height>
</rect>
</property>
<property name="baseSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../application.qrc">
<normaloff>:/icons/res/add_contact.png</normaloff>:/icons/res/add_contact.png</iconset>
</property>
<property name="iconSize">
<size>
<width>43</width>
<height>49</height>
</size>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
<widget class="QPushButton" name="pushContact">
<property name="geometry">
<rect>
<x>110</x>
<y>640</y>
<width>191</width>
<height>25</height>
<x>170</x>
<y>0</y>
<width>71</width>
<height>61</height>
</rect>
</property>
<property name="baseSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="text">
<string>Incoming contact request</string>
<string/>
</property>
<property name="icon">
<iconset resource="../application.qrc">
<normaloff>:/icons/res/notification.png</normaloff>:/icons/res/notification.png</iconset>
</property>
<property name="iconSize">
<size>
<width>43</width>
<height>49</height>
</size>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</widget>

Loading…
Cancel
Save