Merge pull request #600 from crowning-/UI_Enhancements

UI: theme-dependent icons/images Step 1
This commit is contained in:
evan82 2015-09-11 14:45:33 -07:00
commit ee9018aee9
12 changed files with 45 additions and 102 deletions

View File

@ -35,6 +35,11 @@ AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget *parent) :
ui->copyAddress->setIcon(QIcon()); ui->copyAddress->setIcon(QIcon());
ui->deleteAddress->setIcon(QIcon()); ui->deleteAddress->setIcon(QIcon());
ui->exportButton->setIcon(QIcon()); ui->exportButton->setIcon(QIcon());
#else
ui->newAddress->setIcon(QIcon(":/icons/add"));
ui->copyAddress->setIcon(QIcon(":/icons/editcopy"));
ui->deleteAddress->setIcon(QIcon(":/icons/remove"));
ui->exportButton->setIcon(QIcon(":/icons/export"));
#endif #endif
switch(mode) switch(mode)

View File

@ -59,10 +59,6 @@
<property name="text"> <property name="text">
<string>&amp;New</string> <string>&amp;New</string>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/add</normaloff>:/icons/add</iconset>
</property>
<property name="autoDefault"> <property name="autoDefault">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -76,10 +72,6 @@
<property name="text"> <property name="text">
<string>&amp;Copy</string> <string>&amp;Copy</string>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/editcopy</normaloff>:/icons/editcopy</iconset>
</property>
<property name="autoDefault"> <property name="autoDefault">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -93,10 +85,6 @@
<property name="text"> <property name="text">
<string>&amp;Delete</string> <string>&amp;Delete</string>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
</property>
<property name="autoDefault"> <property name="autoDefault">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -123,10 +111,6 @@
<property name="text"> <property name="text">
<string>&amp;Export</string> <string>&amp;Export</string>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/export</normaloff>:/icons/export</iconset>
</property>
<property name="autoDefault"> <property name="autoDefault">
<bool>false</bool> <bool>false</bool>
</property> </property>

View File

@ -140,10 +140,6 @@
<property name="text"> <property name="text">
<string>&amp;Request payment</string> <string>&amp;Request payment</string>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/receiving_addresses</normaloff>:/icons/receiving_addresses</iconset>
</property>
</widget> </widget>
</item> </item>
<item> <item>
@ -160,10 +156,6 @@
<property name="text"> <property name="text">
<string>Clear</string> <string>Clear</string>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
</property>
<property name="autoDefault"> <property name="autoDefault">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -263,10 +255,6 @@
<property name="text"> <property name="text">
<string>Show</string> <string>Show</string>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/edit</normaloff>:/icons/edit</iconset>
</property>
<property name="autoDefault"> <property name="autoDefault">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -283,10 +271,6 @@
<property name="text"> <property name="text">
<string>Remove</string> <string>Remove</string>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
</property>
<property name="autoDefault"> <property name="autoDefault">
<bool>false</bool> <bool>false</bool>
</property> </property>

View File

@ -413,10 +413,6 @@
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
</property>
<property name="shortcut"> <property name="shortcut">
<string notr="true">Ctrl+L</string> <string notr="true">Ctrl+L</string>
</property> </property>

View File

@ -616,8 +616,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>830</width> <width>828</width>
<height>68</height> <height>67</height>
</rect> </rect>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,1"> <layout class="QVBoxLayout" name="verticalLayout_2" stretch="0,1">
@ -1257,10 +1257,6 @@
<property name="text"> <property name="text">
<string>S&amp;end</string> <string>S&amp;end</string>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/send</normaloff>:/icons/send</iconset>
</property>
<property name="autoDefault"> <property name="autoDefault">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -1283,10 +1279,6 @@
<property name="text"> <property name="text">
<string>Clear &amp;All</string> <string>Clear &amp;All</string>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
</property>
<property name="autoDefault"> <property name="autoDefault">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -1300,10 +1292,6 @@
<property name="text"> <property name="text">
<string>Add &amp;Recipient</string> <string>Add &amp;Recipient</string>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/add</normaloff>:/icons/add</iconset>
</property>
<property name="autoDefault"> <property name="autoDefault">
<bool>false</bool> <bool>false</bool>
</property> </property>

View File

@ -63,10 +63,6 @@
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/address-book</normaloff>:/icons/address-book</iconset>
</property>
<property name="shortcut"> <property name="shortcut">
<string>Alt+A</string> <string>Alt+A</string>
</property> </property>
@ -80,10 +76,6 @@
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/editpaste</normaloff>:/icons/editpaste</iconset>
</property>
<property name="shortcut"> <property name="shortcut">
<string>Alt+P</string> <string>Alt+P</string>
</property> </property>
@ -97,10 +89,6 @@
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -621,10 +609,6 @@
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -1157,10 +1141,6 @@
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
</property>
</widget> </widget>
</item> </item>
</layout> </layout>

View File

@ -60,10 +60,6 @@
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/address-book</normaloff>:/icons/address-book</iconset>
</property>
<property name="shortcut"> <property name="shortcut">
<string>Alt+A</string> <string>Alt+A</string>
</property> </property>
@ -80,10 +76,6 @@
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/editpaste</normaloff>:/icons/editpaste</iconset>
</property>
<property name="shortcut"> <property name="shortcut">
<string>Alt+P</string> <string>Alt+P</string>
</property> </property>
@ -136,10 +128,6 @@
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/editcopy</normaloff>:/icons/editcopy</iconset>
</property>
<property name="autoDefault"> <property name="autoDefault">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -157,10 +145,6 @@
<property name="text"> <property name="text">
<string>Sign &amp;Message</string> <string>Sign &amp;Message</string>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/edit</normaloff>:/icons/edit</iconset>
</property>
<property name="autoDefault"> <property name="autoDefault">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -174,10 +158,6 @@
<property name="text"> <property name="text">
<string>Clear &amp;All</string> <string>Clear &amp;All</string>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
</property>
<property name="autoDefault"> <property name="autoDefault">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -270,10 +250,6 @@
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/address-book</normaloff>:/icons/address-book</iconset>
</property>
<property name="shortcut"> <property name="shortcut">
<string>Alt+A</string> <string>Alt+A</string>
</property> </property>
@ -300,10 +276,6 @@
<property name="text"> <property name="text">
<string>Verify &amp;Message</string> <string>Verify &amp;Message</string>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/transaction_0</normaloff>:/icons/transaction_0</iconset>
</property>
<property name="autoDefault"> <property name="autoDefault">
<bool>false</bool> <bool>false</bool>
</property> </property>
@ -317,10 +289,6 @@
<property name="text"> <property name="text">
<string>Clear &amp;All</string> <string>Clear &amp;All</string>
</property> </property>
<property name="icon">
<iconset resource="../dash.qrc">
<normaloff>:/icons/remove</normaloff>:/icons/remove</iconset>
</property>
<property name="autoDefault"> <property name="autoDefault">
<bool>false</bool> <bool>false</bool>
</property> </property>

View File

@ -33,6 +33,11 @@ ReceiveCoinsDialog::ReceiveCoinsDialog(QWidget *parent) :
ui->receiveButton->setIcon(QIcon()); ui->receiveButton->setIcon(QIcon());
ui->showRequestButton->setIcon(QIcon()); ui->showRequestButton->setIcon(QIcon());
ui->removeRequestButton->setIcon(QIcon()); ui->removeRequestButton->setIcon(QIcon());
#else
ui->clearButton->setIcon(QIcon(":/icons/remove"));
ui->receiveButton->setIcon(QIcon(":/icons/receiving_addresses"));
ui->showRequestButton->setIcon(QIcon(":/icons/edit"));
ui->removeRequestButton->setIcon(QIcon(":/icons/remove"));
#endif #endif
// context menu actions // context menu actions

View File

@ -222,6 +222,9 @@ RPCConsole::RPCConsole(QWidget *parent) :
ui->openDebugLogfileButton->setIcon(QIcon(":/icons/export")); ui->openDebugLogfileButton->setIcon(QIcon(":/icons/export"));
#endif #endif
// Needed on Mac also
ui->clearButton->setIcon(QIcon(":/icons/remove"));
// Install event filter for up and down arrow // Install event filter for up and down arrow
ui->lineEdit->installEventFilter(this); ui->lineEdit->installEventFilter(this);
ui->messagesWidget->installEventFilter(this); ui->messagesWidget->installEventFilter(this);

View File

@ -39,6 +39,10 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
ui->addButton->setIcon(QIcon()); ui->addButton->setIcon(QIcon());
ui->clearButton->setIcon(QIcon()); ui->clearButton->setIcon(QIcon());
ui->sendButton->setIcon(QIcon()); ui->sendButton->setIcon(QIcon());
#else
ui->addButton->setIcon(QIcon(":/icons/add"));
ui->clearButton->setIcon(QIcon(":/icons/remove"));
ui->sendButton->setIcon(QIcon(":/icons/send"));
#endif #endif
GUIUtil::setupAddressWidget(ui->lineEditCoinControlChange, this); GUIUtil::setupAddressWidget(ui->lineEditCoinControlChange, this);

View File

@ -31,6 +31,13 @@ SendCoinsEntry::SendCoinsEntry(QWidget *parent) :
ui->addAsLabel->setPlaceholderText(tr("Enter a label for this address to add it to your address book")); ui->addAsLabel->setPlaceholderText(tr("Enter a label for this address to add it to your address book"));
#endif #endif
// These icons are needed on Mac also!
ui->addressBookButton->setIcon(QIcon(":/icons/address-book"));
ui->pasteButton->setIcon(QIcon(":/icons/editpaste"));
ui->deleteButton->setIcon(QIcon(":/icons/remove"));
ui->deleteButton_is->setIcon(QIcon(":/icons/remove"));
ui->deleteButton_s->setIcon(QIcon(":/icons/remove"));
// normal dash address field // normal dash address field
GUIUtil::setupAddressWidget(ui->payTo, this); GUIUtil::setupAddressWidget(ui->payTo, this);
// just a label for displaying dash address(es) // just a label for displaying dash address(es)

View File

@ -30,6 +30,25 @@ SignVerifyMessageDialog::SignVerifyMessageDialog(QWidget *parent) :
ui->signatureOut_SM->setPlaceholderText(tr("Click \"Sign Message\" to generate signature")); ui->signatureOut_SM->setPlaceholderText(tr("Click \"Sign Message\" to generate signature"));
#endif #endif
#ifdef Q_OS_MAC // Icons on push buttons are very uncommon on Mac
ui->signMessageButton_SM->setIcon(QIcon());
ui->clearButton_SM->setIcon(QIcon());
ui->verifyMessageButton_VM->setIcon(QIcon());
ui->clearButton_VM->setIcon(QIcon());
#else
ui->signMessageButton_SM->setIcon(QIcon(":/icons/edit"));
ui->clearButton_SM->setIcon(QIcon(":/icons/remove"));
ui->verifyMessageButton_VM->setIcon(QIcon(":/icons/transaction_0"));
ui->clearButton_VM->setIcon(QIcon(":/icons/remove"));
#endif
// These icons are needed on Mac also
ui->addressBookButton_SM->setIcon(QIcon(":/icons/address-book"));
ui->pasteButton_SM->setIcon(QIcon(":/icons/editpaste"));
ui->copySignatureButton_SM->setIcon(QIcon(":/icons/editcopy"));
ui->addressBookButton_VM->setIcon(QIcon(":/icons/address-book"));
GUIUtil::setupAddressWidget(ui->addressIn_SM, this); GUIUtil::setupAddressWidget(ui->addressIn_SM, this);
GUIUtil::setupAddressWidget(ui->addressIn_VM, this); GUIUtil::setupAddressWidget(ui->addressIn_VM, this);