Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 38 additions & 32 deletions src/Makefile.qt.include
Original file line number Diff line number Diff line change
Expand Up @@ -305,18 +305,14 @@ BITCOIN_QT_CPP += $(BITCOIN_QT_WALLET_CPP)
endif

RES_IMAGES = \
qt/res/images/arrow_down_normal.png \
qt/res/images/arrow_down_hover.png \
qt/res/images/arrow_down_pressed.png \
qt/res/images/arrow_left_normal.png \
qt/res/images/arrow_left_hover.png \
qt/res/images/arrow_left_pressed.png \
qt/res/images/arrow_right_normal.png \
qt/res/images/arrow_right_hover.png \
qt/res/images/arrow_right_pressed.png \
qt/res/images/arrow_up_normal.png \
qt/res/images/arrow_up_hover.png \
qt/res/images/arrow_up_pressed.png \
qt/res/images/arrow_down_dark.png \
qt/res/images/arrow_down_light.png \
qt/res/images/arrow_left_dark.png \
qt/res/images/arrow_left_light.png \
qt/res/images/arrow_right_dark.png \
qt/res/images/arrow_right_light.png \
qt/res/images/arrow_up_dark.png \
qt/res/images/arrow_up_light.png \
qt/res/images/arrow_light_down_normal.png \
qt/res/images/arrow_light_down_hover.png \
qt/res/images/arrow_light_left_normal.png \
Expand All @@ -325,29 +321,39 @@ RES_IMAGES = \
qt/res/images/arrow_light_right_hover.png \
qt/res/images/arrow_light_up_normal.png \
qt/res/images/arrow_light_up_hover.png \
qt/res/images/checkbox_normal.png \
qt/res/images/checkbox_normal_hover.png \
qt/res/images/checkbox_normal_pressed.png \
qt/res/images/checkbox_normal_disabled.png \
qt/res/images/checkbox_checked.png \
qt/res/images/checkbox_checked_hover.png \
qt/res/images/checkbox_checked_pressed.png \
qt/res/images/checkbox_checked_disabled.png \
qt/res/images/checkbox_partly_checked.png \
qt/res/images/checkbox_partly_checked_hover.png \
qt/res/images/checkbox_partly_checked_pressed.png \
qt/res/images/checkbox_partly_checked_disabled.png \
qt/res/images/checkbox_normal_dark.png \
qt/res/images/checkbox_normal_hover_dark.png \
qt/res/images/checkbox_normal_disabled_dark.png \
qt/res/images/checkbox_checked_dark.png \
qt/res/images/checkbox_checked_hover_dark.png \
qt/res/images/checkbox_checked_disabled_dark.png \
qt/res/images/checkbox_partly_checked_dark.png \
qt/res/images/checkbox_partly_checked_hover_dark.png \
qt/res/images/checkbox_partly_checked_disabled_dark.png \
qt/res/images/checkbox_normal_light.png \
qt/res/images/checkbox_normal_hover_light.png \
qt/res/images/checkbox_normal_disabled_light.png \
qt/res/images/checkbox_checked_light.png \
qt/res/images/checkbox_checked_hover_light.png \
qt/res/images/checkbox_checked_disabled_light.png \
qt/res/images/checkbox_partly_checked_light.png \
qt/res/images/checkbox_partly_checked_hover_light.png \
qt/res/images/checkbox_partly_checked_disabled_light.png \
qt/res/images/dash_logo_horizontal.png \
qt/res/images/dash_logo_toolbar.png \
qt/res/images/dash_logo_toolbar_blue.png \
qt/res/images/radio_normal.png \
qt/res/images/radio_normal_hover.png \
qt/res/images/radio_normal_pressed.png \
qt/res/images/radio_checked.png \
qt/res/images/radio_checked_hover.png \
qt/res/images/radio_checked_pressed.png \
qt/res/images/radio_normal_disabled.png \
qt/res/images/radio_checked_disabled.png \
qt/res/images/radio_normal_dark.png \
qt/res/images/radio_normal_hover_dark.png \
qt/res/images/radio_checked_dark.png \
qt/res/images/radio_checked_hover_dark.png \
qt/res/images/radio_normal_disabled_dark.png \
qt/res/images/radio_checked_disabled_dark.png \
qt/res/images/radio_normal_light.png \
qt/res/images/radio_normal_hover_light.png \
qt/res/images/radio_checked_light.png \
qt/res/images/radio_checked_hover_light.png \
qt/res/images/radio_normal_disabled_light.png \
qt/res/images/radio_checked_disabled_light.png \
qt/res/images/splash.png

RES_CSS = \
Expand Down
45 changes: 29 additions & 16 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1006,21 +1006,21 @@ void BitcoinGUI::updateNetworkState()
QString icon;
switch(count)
{
case 0: icon = ":/icons/connect_0"; break;
case 1: case 2: case 3: icon = ":/icons/connect_1"; break;
case 4: case 5: case 6: icon = ":/icons/connect_2"; break;
case 7: case 8: case 9: icon = ":/icons/connect_3"; break;
default: icon = ":/icons/connect_4"; break;
case 0: icon = "connect_0"; break;
case 1: case 2: case 3: icon = "connect_1"; break;
case 4: case 5: case 6: icon = "connect_2"; break;
case 7: case 8: case 9: icon = "connect_3"; break;
default: icon = "connect_4"; break;
}

if (clientModel->getNetworkActive()) {
labelConnectionsIcon->setToolTip(tr("%n active connection(s) to Dash network", "", count));
} else {
labelConnectionsIcon->setToolTip(tr("Network activity disabled"));
icon = ":/icons/network_disabled";
icon = "network_disabled";
}

labelConnectionsIcon->setPixmap(QIcon(icon).pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
labelConnectionsIcon->setPixmap(GUIUtil::getIcon(icon).pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
}

void BitcoinGUI::setNumConnections(int count)
Expand Down Expand Up @@ -1138,8 +1138,8 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, double nVer
tooltip = tr("Catching up...") + QString("<br>") + tooltip;
if(count != prevBlocks)
{
labelBlocksIcon->setPixmap(QIcon(QString(
":/movies/spinner-%1").arg(spinnerFrame, 3, 10, QChar('0')))
labelBlocksIcon->setPixmap(GUIUtil::getIcon(QString(
"spinner-%1").arg(spinnerFrame, 3, 10, QChar('0')), GUIUtil::ThemedColor::BLUE, MOVIES_PATH)
.pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
spinnerFrame = (spinnerFrame + 1) % SPINNER_FRAMES;
}
Expand Down Expand Up @@ -1194,11 +1194,11 @@ void BitcoinGUI::setAdditionalDataSyncProgress(double nSyncProgress)
if(masternodeSync.IsSynced()) {
progressBarLabel->setVisible(false);
progressBar->setVisible(false);
labelBlocksIcon->setPixmap(QIcon(":/icons/synced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
labelBlocksIcon->setPixmap(GUIUtil::getIcon("synced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
} else {

labelBlocksIcon->setPixmap(QIcon(QString(
":/movies/spinner-%1").arg(spinnerFrame, 3, 10, QChar('0')))
labelBlocksIcon->setPixmap(GUIUtil::getIcon(QString(
"spinner-%1").arg(spinnerFrame, 3, 10, QChar('0')), GUIUtil::ThemedColor::BLUE, MOVIES_PATH)
.pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
spinnerFrame = (spinnerFrame + 1) % SPINNER_FRAMES;

Expand Down Expand Up @@ -1301,6 +1301,19 @@ void BitcoinGUI::changeEvent(QEvent *e)
}
}
#endif
if (e->type() == QEvent::StyleChange) {
updateNetworkState();
#ifdef ENABLE_WALLET
updateWalletStatus();
#endif
if (masternodeSync.IsSynced()) {
labelBlocksIcon->setPixmap(GUIUtil::getIcon("synced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
} else {
labelBlocksIcon->setPixmap(GUIUtil::getIcon(QString(
"spinner-%1").arg(spinnerFrame, 3, 10, QChar('0')), GUIUtil::ThemedColor::BLUE, MOVIES_PATH)
.pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
}
}
}

void BitcoinGUI::closeEvent(QCloseEvent *event)
Expand Down Expand Up @@ -1470,7 +1483,7 @@ bool BitcoinGUI::handlePaymentRequest(const SendCoinsRecipient& recipient)

void BitcoinGUI::setHDStatus(int hdEnabled)
{
labelWalletHDStatusIcon->setPixmap(QIcon(hdEnabled ? ":/icons/hd_enabled" : ":/icons/hd_disabled").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
labelWalletHDStatusIcon->setPixmap(GUIUtil::getIcon(hdEnabled ? "hd_enabled" : "hd_disabled").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
labelWalletHDStatusIcon->setToolTip(hdEnabled ? tr("HD key generation is <b>enabled</b>") : tr("HD key generation is <b>disabled</b>"));

// eventually disable the QLabel to set its opacity to 50%
Expand All @@ -1491,7 +1504,7 @@ void BitcoinGUI::setEncryptionStatus(int status)
break;
case WalletModel::Unlocked:
labelWalletEncryptionIcon->show();
labelWalletEncryptionIcon->setPixmap(QIcon(":/icons/lock_open").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
labelWalletEncryptionIcon->setPixmap(GUIUtil::getIcon("lock_open").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
labelWalletEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>unlocked</b>"));
encryptWalletAction->setChecked(true);
changePassphraseAction->setEnabled(true);
Expand All @@ -1501,7 +1514,7 @@ void BitcoinGUI::setEncryptionStatus(int status)
break;
case WalletModel::UnlockedForMixingOnly:
labelWalletEncryptionIcon->show();
labelWalletEncryptionIcon->setPixmap(QIcon(":/icons/lock_open").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
labelWalletEncryptionIcon->setPixmap(GUIUtil::getIcon("lock_open").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
labelWalletEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>unlocked</b> for mixing only"));
encryptWalletAction->setChecked(true);
changePassphraseAction->setEnabled(true);
Expand All @@ -1511,7 +1524,7 @@ void BitcoinGUI::setEncryptionStatus(int status)
break;
case WalletModel::Locked:
labelWalletEncryptionIcon->show();
labelWalletEncryptionIcon->setPixmap(QIcon(":/icons/lock_closed").pixmap(STATUSBAR_ICONSIZE,STATUSBAR_ICONSIZE));
labelWalletEncryptionIcon->setPixmap(GUIUtil::getIcon("lock_closed").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
labelWalletEncryptionIcon->setToolTip(tr("Wallet is <b>encrypted</b> and currently <b>locked</b>"));
encryptWalletAction->setChecked(true);
changePassphraseAction->setEnabled(true);
Expand Down
6 changes: 3 additions & 3 deletions src/qt/coincontroldialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ void CoinControlDialog::buttonToggleLockClicked()
else{
model->lockCoin(outpt);
item->setDisabled(true);
item->setIcon(COLUMN_CHECKBOX, QIcon(":/icons/lock_closed"));
item->setIcon(COLUMN_CHECKBOX, GUIUtil::getIcon("lock_closed", GUIUtil::ThemedColor::RED));
}
updateLabelLocked();
}
Expand Down Expand Up @@ -314,7 +314,7 @@ void CoinControlDialog::lockCoin()
COutPoint outpt(uint256S(contextMenuItem->text(COLUMN_TXHASH).toStdString()), contextMenuItem->text(COLUMN_VOUT_INDEX).toUInt());
model->lockCoin(outpt);
contextMenuItem->setDisabled(true);
contextMenuItem->setIcon(COLUMN_CHECKBOX, QIcon(":/icons/lock_closed"));
contextMenuItem->setIcon(COLUMN_CHECKBOX, GUIUtil::getIcon("lock_closed", GUIUtil::ThemedColor::RED));
updateLabelLocked();
}

Expand Down Expand Up @@ -782,7 +782,7 @@ void CoinControlDialog::updateView()
COutPoint outpt(txhash, out.i);
coinControl()->UnSelect(outpt); // just to be sure
itemOutput->setDisabled(true);
itemOutput->setIcon(COLUMN_CHECKBOX, QIcon(":/icons/lock_closed"));
itemOutput->setIcon(COLUMN_CHECKBOX, GUIUtil::getIcon("lock_closed", GUIUtil::ThemedColor::RED));
}

// set checkbox
Expand Down
70 changes: 38 additions & 32 deletions src/qt/dash.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,14 @@
<file alias="Montserrat-ThinItalic">res/fonts/Montserrat/Montserrat-ThinItalic.otf</file>
</qresource>
<qresource prefix="/images">
<file alias="arrow_down_normal">res/images/arrow_down_normal.png</file>
<file alias="arrow_down_hover">res/images/arrow_down_hover.png</file>
<file alias="arrow_down_pressed">res/images/arrow_down_pressed.png</file>
<file alias="arrow_left_normal">res/images/arrow_left_normal.png</file>
<file alias="arrow_left_hover">res/images/arrow_left_hover.png</file>
<file alias="arrow_left_pressed">res/images/arrow_left_pressed.png</file>
<file alias="arrow_right_normal">res/images/arrow_right_normal.png</file>
<file alias="arrow_right_hover">res/images/arrow_right_hover.png</file>
<file alias="arrow_right_pressed">res/images/arrow_right_pressed.png</file>
<file alias="arrow_up_normal">res/images/arrow_up_normal.png</file>
<file alias="arrow_up_hover">res/images/arrow_up_hover.png</file>
<file alias="arrow_up_pressed">res/images/arrow_up_pressed.png</file>
<file alias="arrow_down_dark">res/images/arrow_down_dark.png</file>
<file alias="arrow_down_light">res/images/arrow_down_light.png</file>
<file alias="arrow_left_dark">res/images/arrow_left_dark.png</file>
<file alias="arrow_left_light">res/images/arrow_left_light.png</file>
<file alias="arrow_right_dark">res/images/arrow_right_dark.png</file>
<file alias="arrow_right_light">res/images/arrow_right_light.png</file>
<file alias="arrow_up_dark">res/images/arrow_up_dark.png</file>
<file alias="arrow_up_light">res/images/arrow_up_light.png</file>
<file alias="arrow_light_down_normal">res/images/arrow_light_down_normal.png</file>
<file alias="arrow_light_down_hover">res/images/arrow_light_down_hover.png</file>
<file alias="arrow_light_left_normal">res/images/arrow_light_left_normal.png</file>
Expand All @@ -101,29 +97,39 @@
<file alias="arrow_light_right_hover">res/images/arrow_light_right_hover.png</file>
<file alias="arrow_light_up_normal">res/images/arrow_light_up_normal.png</file>
<file alias="arrow_light_up_hover">res/images/arrow_light_up_hover.png</file>
<file alias="checkbox_normal">res/images/checkbox_normal.png</file>
<file alias="checkbox_normal_hover">res/images/checkbox_normal_hover.png</file>
<file alias="checkbox_normal_pressed">res/images/checkbox_normal_pressed.png</file>
<file alias="checkbox_normal_disabled">res/images/checkbox_normal_disabled.png</file>
<file alias="checkbox_checked">res/images/checkbox_checked.png</file>
<file alias="checkbox_checked_hover">res/images/checkbox_checked_hover.png</file>
<file alias="checkbox_checked_pressed">res/images/checkbox_checked_pressed.png</file>
<file alias="checkbox_checked_disabled">res/images/checkbox_checked_disabled.png</file>
<file alias="checkbox_partly_checked">res/images/checkbox_partly_checked.png</file>
<file alias="checkbox_partly_checked_hover">res/images/checkbox_partly_checked_hover.png</file>
<file alias="checkbox_partly_checked_pressed">res/images/checkbox_partly_checked_pressed.png</file>
<file alias="checkbox_partly_checked_disabled">res/images/checkbox_partly_checked_disabled.png</file>
<file alias="checkbox_normal_dark">res/images/checkbox_normal_dark.png</file>
<file alias="checkbox_normal_hover_dark">res/images/checkbox_normal_hover_dark.png</file>
<file alias="checkbox_normal_disabled_dark">res/images/checkbox_normal_disabled_dark.png</file>
<file alias="checkbox_checked_dark">res/images/checkbox_checked_dark.png</file>
<file alias="checkbox_checked_hover_dark">res/images/checkbox_checked_hover_dark.png</file>
<file alias="checkbox_checked_disabled_dark">res/images/checkbox_checked_disabled_dark.png</file>
<file alias="checkbox_partly_checked_dark">res/images/checkbox_partly_checked_dark.png</file>
<file alias="checkbox_partly_checked_hover_dark">res/images/checkbox_partly_checked_hover_dark.png</file>
<file alias="checkbox_partly_checked_disabled_dark">res/images/checkbox_partly_checked_disabled_dark.png</file>
<file alias="checkbox_normal_light">res/images/checkbox_normal_light.png</file>
<file alias="checkbox_normal_hover_light">res/images/checkbox_normal_hover_light.png</file>
<file alias="checkbox_normal_disabled_light">res/images/checkbox_normal_disabled_light.png</file>
<file alias="checkbox_checked_light">res/images/checkbox_checked_light.png</file>
<file alias="checkbox_checked_hover_light">res/images/checkbox_checked_hover_light.png</file>
<file alias="checkbox_checked_disabled_light">res/images/checkbox_checked_disabled_light.png</file>
<file alias="checkbox_partly_checked_light">res/images/checkbox_partly_checked_light.png</file>
<file alias="checkbox_partly_checked_hover_light">res/images/checkbox_partly_checked_hover_light.png</file>
<file alias="checkbox_partly_checked_disabled_light">res/images/checkbox_partly_checked_disabled_dark.png</file>
<file alias="dash_logo_horizontal">res/images/dash_logo_horizontal.png</file>
<file alias="dash_logo_toolbar">res/images/dash_logo_toolbar.png</file>
<file alias="dash_logo_toolbar_blue">res/images/dash_logo_toolbar_blue.png</file>
<file alias="radio_normal">res/images/radio_normal.png</file>
<file alias="radio_normal_hover">res/images/radio_normal_hover.png</file>
<file alias="radio_normal_pressed">res/images/radio_normal_pressed.png</file>
<file alias="radio_checked">res/images/radio_checked.png</file>
<file alias="radio_checked_hover">res/images/radio_checked_hover.png</file>
<file alias="radio_checked_pressed">res/images/radio_checked_pressed.png</file>
<file alias="radio_normal_disabled">res/images/radio_normal_disabled.png</file>
<file alias="radio_checked_disabled">res/images/radio_checked_disabled.png</file>
<file alias="radio_normal_dark">res/images/radio_normal_dark.png</file>
<file alias="radio_normal_hover_dark">res/images/radio_normal_hover_dark.png</file>
<file alias="radio_checked_dark">res/images/radio_checked_dark.png</file>
<file alias="radio_checked_hover_dark">res/images/radio_checked_hover_dark.png</file>
<file alias="radio_normal_disabled_dark">res/images/radio_normal_disabled_dark.png</file>
<file alias="radio_checked_disabled_dark">res/images/radio_checked_disabled_dark.png</file>
<file alias="radio_normal_light">res/images/radio_normal_light.png</file>
<file alias="radio_normal_hover_light">res/images/radio_normal_hover_light.png</file>
<file alias="radio_checked_light">res/images/radio_checked_light.png</file>
<file alias="radio_checked_hover_light">res/images/radio_checked_hover_light.png</file>
<file alias="radio_normal_disabled_light">res/images/radio_normal_disabled_light.png</file>
<file alias="radio_checked_disabled_light">res/images/radio_checked_disabled_light.png</file>
<file alias="splash">res/images/splash.png</file>
</qresource>
<qresource prefix="/movies">
Expand Down
Loading