UI: theme-dependent icons/images Step 1

This commit is contained in:
crowning- 2015-09-05 22:54:11 +02:00
parent 4059322cff
commit bf528715fc
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->deleteAddress->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
switch(mode)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -33,6 +33,11 @@ ReceiveCoinsDialog::ReceiveCoinsDialog(QWidget *parent) :
ui->receiveButton->setIcon(QIcon());
ui->showRequestButton->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
// context menu actions

View File

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

View File

@ -39,6 +39,10 @@ SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
ui->addButton->setIcon(QIcon());
ui->clearButton->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
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"));
#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
GUIUtil::setupAddressWidget(ui->payTo, this);
// 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"));
#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_VM, this);