Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI: theme-dependent icons/images Step 2-5 #612

Merged
merged 10 commits into from
Sep 22, 2015
Merged
205 changes: 138 additions & 67 deletions src/Makefile.qt.include
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -157,63 +157,122 @@ BITCOIN_QT_H = \
qt/winshutdownmonitor.h

RES_ICONS = \
qt/res/icons/add.png \
qt/res/icons/address-book.png \
qt/res/icons/bitcoin.ico \
qt/res/icons/bitcoin.png \
qt/res/icons/bitcoin_testnet.ico \
qt/res/icons/bitcoin_testnet.png \
qt/res/icons/browse.png \
qt/res/icons/clock1.png \
qt/res/icons/clock2.png \
qt/res/icons/clock3.png \
qt/res/icons/clock4.png \
qt/res/icons/clock5.png \
qt/res/icons/configure.png \
qt/res/icons/connect0_16.png \
qt/res/icons/connect1_16.png \
qt/res/icons/connect2_16.png \
qt/res/icons/connect3_16.png \
qt/res/icons/connect4_16.png \
qt/res/icons/debugwindow.png \
qt/res/icons/drkblue_editpaste.png \
qt/res/icons/drkblue_address-book.png \
qt/res/icons/drkblue_editcopy.png \
qt/res/icons/drkblue_remove.png \
qt/res/icons/edit.png \
qt/res/icons/editcopy.png \
qt/res/icons/editpaste.png \
qt/res/icons/export.png \
qt/res/icons/eye.png \
qt/res/icons/eye_minus.png \
qt/res/icons/eye_plus.png \
qt/res/icons/filesave.png \
qt/res/icons/history.png \
qt/res/icons/key.png \
qt/res/icons/lock_closed.png \
qt/res/icons/lock_open.png \
qt/res/icons/overview.png \
qt/res/icons/qrcode.png \
qt/res/icons/quit.png \
qt/res/icons/receive.png \
qt/res/icons/remove.png \
qt/res/icons/send.png \
qt/res/icons/synced.png \
qt/res/icons/transaction0.png \
qt/res/icons/transaction2.png \
qt/res/icons/transaction_conflicted.png \
qt/res/icons/tx_inout.png \
qt/res/icons/tx_input.png \
qt/res/icons/tx_output.png \
qt/res/icons/tx_mined.png \
qt/res/icons/unit_dash.png \
qt/res/icons/unit_mdash.png \
qt/res/icons/unit_udash.png \
qt/res/icons/unit_duffs.png \
qt/res/icons/unit_tdash.png \
qt/res/icons/unit_tmdash.png \
qt/res/icons/unit_tudash.png \
qt/res/icons/unit_tduffs.png
qt/res/icons/drkblue/add.png \
qt/res/icons/drkblue/address-book.png \
qt/res/icons/drkblue/bitcoin.ico \
qt/res/icons/drkblue/bitcoin.png \
qt/res/icons/drkblue/bitcoin_testnet.ico \
qt/res/icons/drkblue/bitcoin_testnet.png \
qt/res/icons/drkblue/browse.png \
qt/res/icons/drkblue/clock1.png \
qt/res/icons/drkblue/clock2.png \
qt/res/icons/drkblue/clock3.png \
qt/res/icons/drkblue/clock4.png \
qt/res/icons/drkblue/clock5.png \
qt/res/icons/drkblue/configure.png \
qt/res/icons/drkblue/connect0_16.png \
qt/res/icons/drkblue/connect1_16.png \
qt/res/icons/drkblue/connect2_16.png \
qt/res/icons/drkblue/connect3_16.png \
qt/res/icons/drkblue/connect4_16.png \
qt/res/icons/drkblue/debugwindow.png \
qt/res/icons/drkblue/drkblue_editpaste.png \
qt/res/icons/drkblue/drkblue_address-book.png \
qt/res/icons/drkblue/drkblue_editcopy.png \
qt/res/icons/drkblue/drkblue_remove.png \
qt/res/icons/drkblue/edit.png \
qt/res/icons/drkblue/editcopy.png \
qt/res/icons/drkblue/editpaste.png \
qt/res/icons/drkblue/export.png \
qt/res/icons/drkblue/eye.png \
qt/res/icons/drkblue/eye_minus.png \
qt/res/icons/drkblue/eye_plus.png \
qt/res/icons/drkblue/filesave.png \
qt/res/icons/drkblue/history.png \
qt/res/icons/drkblue/key.png \
qt/res/icons/drkblue/lock_closed.png \
qt/res/icons/drkblue/lock_open.png \
qt/res/icons/drkblue/overview.png \
qt/res/icons/drkblue/qrcode.png \
qt/res/icons/drkblue/quit.png \
qt/res/icons/drkblue/receive.png \
qt/res/icons/drkblue/remove.png \
qt/res/icons/drkblue/send.png \
qt/res/icons/drkblue/synced.png \
qt/res/icons/drkblue/transaction0.png \
qt/res/icons/drkblue/transaction2.png \
qt/res/icons/drkblue/transaction_conflicted.png \
qt/res/icons/drkblue/tx_inout.png \
qt/res/icons/drkblue/tx_input.png \
qt/res/icons/drkblue/tx_output.png \
qt/res/icons/drkblue/tx_mined.png \
qt/res/icons/drkblue/unit_dash.png \
qt/res/icons/drkblue/unit_mdash.png \
qt/res/icons/drkblue/unit_udash.png \
qt/res/icons/drkblue/unit_duffs.png \
qt/res/icons/drkblue/unit_tdash.png \
qt/res/icons/drkblue/unit_tmdash.png \
qt/res/icons/drkblue/unit_tudash.png \
qt/res/icons/drkblue/unit_tduffs.png \
qt/res/icons/trad/add.png \
qt/res/icons/trad/address-book.png \
qt/res/icons/trad/bitcoin.ico \
qt/res/icons/trad/bitcoin.png \
qt/res/icons/trad/bitcoin_testnet.ico \
qt/res/icons/trad/bitcoin_testnet.png \
qt/res/icons/trad/browse.png \
qt/res/icons/trad/clock1.png \
qt/res/icons/trad/clock2.png \
qt/res/icons/trad/clock3.png \
qt/res/icons/trad/clock4.png \
qt/res/icons/trad/clock5.png \
qt/res/icons/trad/configure.png \
qt/res/icons/trad/connect0_16.png \
qt/res/icons/trad/connect1_16.png \
qt/res/icons/trad/connect2_16.png \
qt/res/icons/trad/connect3_16.png \
qt/res/icons/trad/connect4_16.png \
qt/res/icons/trad/debugwindow.png \
qt/res/icons/trad/drkblue_editpaste.png \
qt/res/icons/trad/drkblue_address-book.png \
qt/res/icons/trad/drkblue_editcopy.png \
qt/res/icons/trad/drkblue_remove.png \
qt/res/icons/trad/edit.png \
qt/res/icons/trad/editcopy.png \
qt/res/icons/trad/editpaste.png \
qt/res/icons/trad/export.png \
qt/res/icons/trad/eye.png \
qt/res/icons/trad/eye_minus.png \
qt/res/icons/trad/eye_plus.png \
qt/res/icons/trad/filesave.png \
qt/res/icons/trad/history.png \
qt/res/icons/trad/key.png \
qt/res/icons/trad/lock_closed.png \
qt/res/icons/trad/lock_open.png \
qt/res/icons/trad/overview.png \
qt/res/icons/trad/qrcode.png \
qt/res/icons/trad/quit.png \
qt/res/icons/trad/receive.png \
qt/res/icons/trad/remove.png \
qt/res/icons/trad/send.png \
qt/res/icons/trad/synced.png \
qt/res/icons/trad/transaction0.png \
qt/res/icons/trad/transaction2.png \
qt/res/icons/trad/transaction_conflicted.png \
qt/res/icons/trad/tx_inout.png \
qt/res/icons/trad/tx_input.png \
qt/res/icons/trad/tx_output.png \
qt/res/icons/trad/tx_mined.png \
qt/res/icons/trad/unit_dash.png \
qt/res/icons/trad/unit_mdash.png \
qt/res/icons/trad/unit_udash.png \
qt/res/icons/trad/unit_duffs.png \
qt/res/icons/trad/unit_tdash.png \
qt/res/icons/trad/unit_tmdash.png \
qt/res/icons/trad/unit_tudash.png \
qt/res/icons/trad/unit_tduffs.png

BITCOIN_QT_CPP = \
qt/bitcoinaddressvalidator.cpp \
Expand Down Expand Up @@ -269,18 +328,30 @@ BITCOIN_QT_CPP += \
endif

RES_IMAGES = \
qt/res/images/about.png \
qt/res/images/splash.png \
qt/res/images/splash_testnet.png \
qt/res/images/dash_logo_horizontal.png \
qt/res/images/drkblue_downArrow.png \
qt/res/images/drkblue_downArrow_small.png \
qt/res/images/drkblue_upArrow_small.png \
qt/res/images/drkblue_leftArrow_small.png \
qt/res/images/drkblue_rightArrow_small.png \
qt/res/images/drkblue_qtreeview_selected.png \
qt/res/images/drkblue_walletFrame_bg.png \
qt/res/images/drkblue_walletFrame.png
qt/res/images/drkblue/about.png \
qt/res/images/drkblue/splash.png \
qt/res/images/drkblue/splash_testnet.png \
qt/res/images/drkblue/dash_logo_horizontal.png \
qt/res/images/drkblue/drkblue_downArrow.png \
qt/res/images/drkblue/drkblue_downArrow_small.png \
qt/res/images/drkblue/drkblue_upArrow_small.png \
qt/res/images/drkblue/drkblue_leftArrow_small.png \
qt/res/images/drkblue/drkblue_rightArrow_small.png \
qt/res/images/drkblue/drkblue_qtreeview_selected.png \
qt/res/images/drkblue/drkblue_walletFrame_bg.png \
qt/res/images/drkblue/drkblue_walletFrame.png \
qt/res/images/trad/about.png \
qt/res/images/trad/splash.png \
qt/res/images/trad/splash_testnet.png \
qt/res/images/trad/dash_logo_horizontal.png \
qt/res/images/trad/drkblue_downArrow.png \
qt/res/images/trad/drkblue_downArrow_small.png \
qt/res/images/trad/drkblue_upArrow_small.png \
qt/res/images/trad/drkblue_leftArrow_small.png \
qt/res/images/trad/drkblue_rightArrow_small.png \
qt/res/images/trad/drkblue_qtreeview_selected.png \
qt/res/images/trad/drkblue_walletFrame_bg.png \
qt/res/images/trad/drkblue_walletFrame.png

RES_CSS = \
qt/res/css/drkblue.css
Expand Down
11 changes: 6 additions & 5 deletions src/qt/addressbookpage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,18 @@ AddressBookPage::AddressBookPage(Mode mode, Tabs tab, QWidget *parent) :
tab(tab)
{
ui->setupUi(this);

QString theme = GUIUtil::getThemeName();

#ifdef Q_OS_MAC // Icons on push buttons are very uncommon on Mac
ui->newAddress->setIcon(QIcon());
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"));
ui->newAddress->setIcon(QIcon(":/icons/" + theme + "/add"));
ui->copyAddress->setIcon(QIcon(":/icons/" + theme + "/editcopy"));
ui->deleteAddress->setIcon(QIcon(":/icons/" + theme + "/remove"));
ui->exportButton->setIcon(QIcon(":/icons/" + theme + "/export"));
#endif

switch(mode)
Expand Down
Loading