From 5bb4b53a837ad5bbd5ded11cba4d2e525ec9b9de Mon Sep 17 00:00:00 2001 From: xdustinface Date: Wed, 2 Sep 2020 14:56:17 +0200 Subject: [PATCH 1/9] qt: Adjust green color --- src/qt/guiutil.cpp | 4 ++-- src/qt/res/css/general.css | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index d17dfce1a41d..7809afa6e97f 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -152,7 +152,7 @@ static const std::map 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) }, @@ -170,7 +170,7 @@ static const std::map 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) }, diff --git a/src/qt/res/css/general.css b/src/qt/res/css/general.css index 647b292cf3c2..e7b22b6dd8e2 100644 --- a/src/qt/res/css/general.css +++ b/src/qt/res/css/general.css @@ -33,7 +33,7 @@ in the file. # Used colors in general.css for commit 44de8a93f2 #00000000 -#096e03 +#5e8c41 #a84832 #c79304 @@ -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 */ From 041c533b8a82c12ffb84bdd4f22e5be7d436b049 Mon Sep 17 00:00:00 2001 From: xdustinface Date: Wed, 2 Sep 2020 15:18:48 +0200 Subject: [PATCH 2/9] qt: Don't disable the HD icon Disabling it leads to incorrect colors due to opacity. --- src/qt/bitcoingui.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index b348564debeb..56c25c6ebb67 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -1485,9 +1485,6 @@ 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 enabled") : tr("HD key generation is disabled")); - - // eventually disable the QLabel to set its opacity to 50% - labelWalletHDStatusIcon->setEnabled(hdEnabled); } void BitcoinGUI::setEncryptionStatus(int status) From 1369caac78c73269ee9d5a2808464f76d46118f1 Mon Sep 17 00:00:00 2001 From: xdustinface Date: Wed, 2 Sep 2020 12:15:59 +0200 Subject: [PATCH 3/9] qt: Move the HD icon to the left Reason: Its the only one not turning green by default if all is set properly. So this lets is look better imo. --- src/qt/bitcoingui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 56c25c6ebb67..a69a89c1106e 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -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); From a493a9046e012583bb3c487b3906f2aa6bbcfd4f Mon Sep 17 00:00:00 2001 From: xdustinface Date: Wed, 2 Sep 2020 15:18:36 +0200 Subject: [PATCH 4/9] qt: Increase statusbar icon size --- src/qt/guiconstants.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qt/guiconstants.h b/src/qt/guiconstants.h index 12378d70cf1c..4309acdcfc4a 100644 --- a/src/qt/guiconstants.h +++ b/src/qt/guiconstants.h @@ -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; From ec473ff4a048c5dcce712be01ff79e1e58c8ea95 Mon Sep 17 00:00:00 2001 From: xdustinface Date: Wed, 2 Sep 2020 17:23:06 +0200 Subject: [PATCH 5/9] qt: Show lock icon in status bar also if wallet is not encrypted Just as signal to the user! --- src/qt/bitcoingui.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index a69a89c1106e..acf50e1328e7 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -1492,7 +1492,9 @@ void BitcoinGUI::setEncryptionStatus(int status) switch(status) { case WalletModel::Unencrypted: - labelWalletEncryptionIcon->hide(); + labelWalletEncryptionIcon->show(); + labelWalletEncryptionIcon->setPixmap(GUIUtil::getIcon("lock_open").pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); + labelWalletEncryptionIcon->setToolTip(tr("Wallet is unencrypted")); encryptWalletAction->setChecked(false); changePassphraseAction->setEnabled(false); unlockWalletAction->setVisible(false); From 8356e598f614b1f0733da7a55bc0a12965046cc3 Mon Sep 17 00:00:00 2001 From: xdustinface Date: Fri, 4 Sep 2020 12:07:53 +0200 Subject: [PATCH 6/9] qt: Refine connection icon usage --- src/qt/bitcoingui.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index acf50e1328e7..6c49ef5926de 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -1007,9 +1007,9 @@ void BitcoinGUI::updateNetworkState() 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; + 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"; break; } From b4ef684cd6fd0009c879624e22469b215934e37f Mon Sep 17 00:00:00 2001 From: xdustinface Date: Wed, 2 Sep 2020 17:34:52 +0200 Subject: [PATCH 7/9] qt: Use state related colors in statusbar --- src/qt/bitcoingui.cpp | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 6c49ef5926de..43f6761fd5c9 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -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 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"; 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) @@ -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; } @@ -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; @@ -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)); } } @@ -1483,7 +1485,7 @@ 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->setPixmap(GUIUtil::getIcon("hd_enabled", hdEnabled ? GUIUtil::ThemedColor::GREEN : GUIUtil::ThemedColor::ICON_ALTERNATIVE_COLOR).pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); labelWalletHDStatusIcon->setToolTip(hdEnabled ? tr("HD key generation is enabled") : tr("HD key generation is disabled")); } @@ -1493,7 +1495,7 @@ void BitcoinGUI::setEncryptionStatus(int status) { case WalletModel::Unencrypted: 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 unencrypted")); encryptWalletAction->setChecked(false); changePassphraseAction->setEnabled(false); @@ -1503,7 +1505,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 encrypted and currently unlocked")); encryptWalletAction->setChecked(true); changePassphraseAction->setEnabled(true); @@ -1513,7 +1515,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 encrypted and currently unlocked for mixing only")); encryptWalletAction->setChecked(true); changePassphraseAction->setEnabled(true); @@ -1523,7 +1525,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 encrypted and currently locked")); encryptWalletAction->setChecked(true); changePassphraseAction->setEnabled(true); From 60d261d78e6cdff3457a5cf8395818ebac22617a Mon Sep 17 00:00:00 2001 From: xdustinface Date: Wed, 9 Sep 2020 05:29:54 +0200 Subject: [PATCH 8/9] qt: Hide the HD icon for non-HD wallets --- src/qt/bitcoingui.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qt/bitcoingui.cpp b/src/qt/bitcoingui.cpp index 43f6761fd5c9..32e8c7ec8c2b 100644 --- a/src/qt/bitcoingui.cpp +++ b/src/qt/bitcoingui.cpp @@ -1485,8 +1485,11 @@ bool BitcoinGUI::handlePaymentRequest(const SendCoinsRecipient& recipient) void BitcoinGUI::setHDStatus(int hdEnabled) { - labelWalletHDStatusIcon->setPixmap(GUIUtil::getIcon("hd_enabled", hdEnabled ? GUIUtil::ThemedColor::GREEN : GUIUtil::ThemedColor::ICON_ALTERNATIVE_COLOR).pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); - labelWalletHDStatusIcon->setToolTip(hdEnabled ? tr("HD key generation is enabled") : tr("HD key generation is disabled")); + if (hdEnabled) { + labelWalletHDStatusIcon->setPixmap(GUIUtil::getIcon("hd_enabled", GUIUtil::ThemedColor::GREEN).pixmap(STATUSBAR_ICONSIZE, STATUSBAR_ICONSIZE)); + labelWalletHDStatusIcon->setToolTip(tr("HD key generation is enabled")); + } + labelWalletHDStatusIcon->setVisible(hdEnabled); } void BitcoinGUI::setEncryptionStatus(int status) From 81498e9d5025db58635b9357084cac4269c28503 Mon Sep 17 00:00:00 2001 From: xdustinface Date: Thu, 10 Sep 2020 19:30:59 +0200 Subject: [PATCH 9/9] qt: Update HD icon --- src/qt/res/icons/hd_enabled.png | Bin 688 -> 458 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/src/qt/res/icons/hd_enabled.png b/src/qt/res/icons/hd_enabled.png index c65c8ddc8a5726ae459a55732923929723543c15..11fe31310a10518664ccd713981468817c579c06 100644 GIT binary patch literal 458 zcmeAS@N?(olHy`uVBq!ia0vp^HXzKw3=&b&bO2Hw0X`wF|Ns97GARd5jh=^rrihmW z`2{mbHHc~Fvwr>X@yFxehitB_d+*B`_j$&IC52NN7#O8IT^vIy;@(cXxUN}&r){f- z^P0X~ulxUf{evt56=trB(RqI4|E74m91+d4`_E0))@|@|WZ&Bta8NJz<-Lv`uRD!z zRy1{QInBG=a;oJ0%~v~QoSh@({NCSDFRsZg%HJuJC|7;Ibmy8q57x=bN98c<80Q)V z=ww19i^H*(m6w4Ko*H)_R3Q$QtdhcCZ*Zx!C zf6hzIoSA-9vaQM3r~2eePQ?uWIk(v#r+vM;`BjD2x&H6Ln+)a8K3AN1zW30dv^xIMw{6(yl_iHj9?=PS|l?D!1XtRwIU*v{(I6JO}@sW4|%IFu%1oXYs+( zeOnl2Bsxnn*2Tt}RLu1**m#G5A$#YP%g1bNQ`s3TW?eo}$;u#crjoBjn?dJc+Kp3j ztPC#_?f%&=U|=}xcuYr>x1s8W&w4fnA2v<)Zsr*Y3*Kh^D{eULc&hagL)VJ^>;)Pg znX4GSxW>nbHbhPM6voQ1FKwC6Ylc0i&Rt}b2xpfFX0Mnu(`Y&K2PNaD&V>w@d$z?s z{?GUzIPFyM)bhqs$5XkY4Z4n}I=CFB7_DF`Q1*Cvonb|rw5lm@L-NO2q6}fJ|JmnW zW02sAUa8HHld9)Yv2KI$mYL;=%EwRhZ)l&np;vR)Y2FK`Gv0My@ASJbXYXXX_}b>q zyK|l-c7H#|8K!-nL-p6z_9f>s{5$U^wHh7R+ZxrF#1*4ujLuas^Wr%l`a3qR-**@5UUW;uAUUOX~hIcx+Yr7I|}~7ceC< Nc)I$ztaD0e0suYl4uAjv