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
48 changes: 26 additions & 22 deletions src/qt/bitcoingui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ BitcoinGUI::BitcoinGUI(const NetworkStyle* networkStyle, QWidget* parent) :
frameBlocksLayout->addStretch();
frameBlocksLayout->addWidget(unitDisplayControl);
frameBlocksLayout->addStretch();
frameBlocksLayout->addWidget(labelWalletEncryptionIcon);
frameBlocksLayout->addWidget(labelWalletHDStatusIcon);
frameBlocksLayout->addWidget(labelWalletEncryptionIcon);
}
frameBlocksLayout->addStretch();
frameBlocksLayout->addWidget(labelConnectionsIcon);
Expand Down Expand Up @@ -1004,23 +1004,25 @@ void BitcoinGUI::updateNetworkState()
{
int count = clientModel->getNumConnections();
QString icon;
GUIUtil::ThemedColor color = GUIUtil::ThemedColor::ORANGE;
switch(count)
{
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;
case 0: icon = "connect_4"; color = GUIUtil::ThemedColor::ICON_ALTERNATIVE_COLOR; break;
case 1: case 2: icon = "connect_1"; break;
case 3: case 4: case 5: icon = "connect_2"; break;
case 6: case 7: icon = "connect_3"; break;
default: icon = "connect_4"; color = GUIUtil::ThemedColor::GREEN; break;
}

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

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

void BitcoinGUI::setNumConnections(int count)
Expand Down Expand Up @@ -1139,7 +1141,7 @@ void BitcoinGUI::setNumBlocks(int count, const QDateTime& blockDate, const QStri
if(count != prevBlocks)
{
labelBlocksIcon->setPixmap(GUIUtil::getIcon(QString(
"spinner-%1").arg(spinnerFrame, 3, 10, QChar('0')), GUIUtil::ThemedColor::BLUE, MOVIES_PATH)
"spinner-%1").arg(spinnerFrame, 3, 10, QChar('0')), GUIUtil::ThemedColor::ORANGE, MOVIES_PATH)
.pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
spinnerFrame = (spinnerFrame + 1) % SPINNER_FRAMES;
}
Expand Down Expand Up @@ -1194,11 +1196,11 @@ void BitcoinGUI::setAdditionalDataSyncProgress(double nSyncProgress)
if(masternodeSync.IsSynced()) {
progressBarLabel->setVisible(false);
progressBar->setVisible(false);
labelBlocksIcon->setPixmap(GUIUtil::getIcon("synced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
labelBlocksIcon->setPixmap(GUIUtil::getIcon("synced", GUIUtil::ThemedColor::GREEN).pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
} else {

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

Expand Down Expand Up @@ -1307,10 +1309,10 @@ void BitcoinGUI::changeEvent(QEvent *e)
updateWalletStatus();
#endif
if (masternodeSync.IsSynced()) {
labelBlocksIcon->setPixmap(GUIUtil::getIcon("synced").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
labelBlocksIcon->setPixmap(GUIUtil::getIcon("synced", GUIUtil::ThemedColor::GREEN).pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
} else {
labelBlocksIcon->setPixmap(GUIUtil::getIcon(QString(
"spinner-%1").arg(spinnerFrame, 3, 10, QChar('0')), GUIUtil::ThemedColor::BLUE, MOVIES_PATH)
"spinner-%1").arg(spinnerFrame, 3, 10, QChar('0')), GUIUtil::ThemedColor::ORANGE, MOVIES_PATH)
.pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
}
}
Expand Down Expand Up @@ -1483,19 +1485,21 @@ bool BitcoinGUI::handlePaymentRequest(const SendCoinsRecipient& recipient)

void BitcoinGUI::setHDStatus(int hdEnabled)
{
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%
labelWalletHDStatusIcon->setEnabled(hdEnabled);
if (hdEnabled) {
labelWalletHDStatusIcon->setPixmap(GUIUtil::getIcon("hd_enabled", GUIUtil::ThemedColor::GREEN).pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
labelWalletHDStatusIcon->setToolTip(tr("HD key generation is <b>enabled</b>"));
}
labelWalletHDStatusIcon->setVisible(hdEnabled);
}

void BitcoinGUI::setEncryptionStatus(int status)
{
switch(status)
{
case WalletModel::Unencrypted:
labelWalletEncryptionIcon->hide();
labelWalletEncryptionIcon->show();
labelWalletEncryptionIcon->setPixmap(GUIUtil::getIcon("lock_open", GUIUtil::ThemedColor::RED).pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
labelWalletEncryptionIcon->setToolTip(tr("Wallet is <b>unencrypted</b>"));
encryptWalletAction->setChecked(false);
changePassphraseAction->setEnabled(false);
unlockWalletAction->setVisible(false);
Expand All @@ -1504,7 +1508,7 @@ void BitcoinGUI::setEncryptionStatus(int status)
break;
case WalletModel::Unlocked:
labelWalletEncryptionIcon->show();
labelWalletEncryptionIcon->setPixmap(GUIUtil::getIcon("lock_open").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
labelWalletEncryptionIcon->setPixmap(GUIUtil::getIcon("lock_open", GUIUtil::ThemedColor::RED).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 @@ -1514,7 +1518,7 @@ void BitcoinGUI::setEncryptionStatus(int status)
break;
case WalletModel::UnlockedForMixingOnly:
labelWalletEncryptionIcon->show();
labelWalletEncryptionIcon->setPixmap(GUIUtil::getIcon("lock_open").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
labelWalletEncryptionIcon->setPixmap(GUIUtil::getIcon("lock_open", GUIUtil::ThemedColor::ORANGE).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 @@ -1524,7 +1528,7 @@ void BitcoinGUI::setEncryptionStatus(int status)
break;
case WalletModel::Locked:
labelWalletEncryptionIcon->show();
labelWalletEncryptionIcon->setPixmap(GUIUtil::getIcon("lock_closed").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE));
labelWalletEncryptionIcon->setPixmap(GUIUtil::getIcon("lock_closed", GUIUtil::ThemedColor::GREEN).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
2 changes: 1 addition & 1 deletion src/qt/guiconstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ static const int MODEL_UPDATE_DELAY = 250;
static const int MAX_PASSPHRASE_SIZE = 1024;

/* DashGUI -- Size of icons in status bar */
static const int STATUSBAR_ICONSIZE = 16;
static const int STATUSBAR_ICONSIZE = 18;

/* DashGUI -- Size of button icons e.g. in SendCoinEntry or SignVerifyMessageDialog */
static const int BUTTON_ICONSIZE = 23;
Expand Down
4 changes: 2 additions & 2 deletions src/qt/guiutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ static const std::map<ThemedColor, QColor> themedColors = {
{ ThemedColor::BLUE, QColor(0, 141, 228) },
{ ThemedColor::ORANGE, QColor(199, 147, 4) },
{ ThemedColor::RED, QColor(168, 72, 50) },
{ ThemedColor::GREEN, QColor(8, 110, 3) },
{ ThemedColor::GREEN, QColor(94, 140, 65) },
{ ThemedColor::BAREADDRESS, QColor(140, 140, 140) },
{ ThemedColor::TX_STATUS_OPENUNTILDATE, QColor(64, 64, 255) },
{ ThemedColor::TX_STATUS_OFFLINE, QColor(192, 192, 192) },
Expand All @@ -170,7 +170,7 @@ static const std::map<ThemedColor, QColor> themedDarkColors = {
{ ThemedColor::BLUE, QColor(0, 89, 154) },
{ ThemedColor::ORANGE, QColor(199, 147, 4) },
{ ThemedColor::RED, QColor(168, 72, 50) },
{ ThemedColor::GREEN, QColor(8, 110, 3) },
{ ThemedColor::GREEN, QColor(94, 140, 65) },
{ ThemedColor::BAREADDRESS, QColor(140, 140, 140) },
{ ThemedColor::TX_STATUS_OPENUNTILDATE, QColor(64, 64, 255) },
{ ThemedColor::TX_STATUS_OFFLINE, QColor(192, 192, 192) },
Expand Down
4 changes: 2 additions & 2 deletions src/qt/res/css/general.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ in the <theme.css> file.
# Used colors in general.css for commit 44de8a93f2

#00000000
#096e03
#5e8c41
#a84832
#c79304

Expand Down Expand Up @@ -1628,7 +1628,7 @@ QWidget#RPCConsole QPushButton#promptIcon { /* Prompt Icon */
}

QWidget#RPCConsole .QGroupBox #line { /* Network In Line */
background-color: #096e03;
background-color: #5e8c41;
}

QWidget#RPCConsole .QGroupBox #line_2 { /* Network Out Line */
Expand Down
Binary file modified src/qt/res/icons/hd_enabled.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.