Add clean shutdown, wallet safety, and UI contrast fixes
Shutdown: - Call litelib_shutdown() to stop Rust background threads on exit - Add 15-second timeout on wallet save dialog to prevent hang on close - Add litelib_shutdown FFI declaration in header and controller UI Contrast (dragonx theme): - Fix disabled buttons: white text was invisible on white background - Add QWizard, QMessageBox, QTextBrowser, QPlainTextEdit styling for dark theme - Add QCheckBox, QRadioButton, QDialogButtonBox contrast rules - Fix seed word verification buttons: dark themed with explicit text color - Fix chat bubbles: replace light backgrounds with dark themed colors - Fix Terms of Service link color: #0000ff -> #6699ff for visibility - Remove duplicate conflicting QLabel#lblMessage CSS rule Add v1.1.0 release notes with checksums
This commit is contained in:
@@ -15,14 +15,16 @@
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QWidget{
|
||||
background: whitesmoke;
|
||||
border: 1px solid #afafaf;
|
||||
background: rgba(216, 38, 82, 0.15);
|
||||
border: 1px solid rgba(216, 38, 82, 0.4);
|
||||
border-radius: 3px;
|
||||
color: white;
|
||||
}
|
||||
QLabel
|
||||
{
|
||||
background: none;
|
||||
border: none;
|
||||
color: rgba(255, 255, 255, 0.9);
|
||||
}</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="lblMessage">
|
||||
|
||||
@@ -15,14 +15,16 @@
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">QWidget{
|
||||
background: #c8e1ff;
|
||||
border: 1px solid #fefefe;
|
||||
background: rgba(41, 21, 21, 0.75);
|
||||
border: 1px solid rgba(216, 38, 82, 0.3);
|
||||
border-radius: 3px;
|
||||
color: white;
|
||||
}
|
||||
QLabel
|
||||
{
|
||||
background: none;
|
||||
border: none;
|
||||
color: rgba(255, 255, 255, 0.85);
|
||||
}</string>
|
||||
</property>
|
||||
<widget class="QLabel" name="lblMessage">
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "settings.h"
|
||||
#include "version.h"
|
||||
#include "camount.h"
|
||||
#include "../lib/silentdragonxlitelib.h"
|
||||
#include "Model/ChatItem.h"
|
||||
#include "DataStore/DataStore.h"
|
||||
#include <future>
|
||||
@@ -2019,6 +2020,9 @@ void Controller::refreshDRAGONXPrice()
|
||||
|
||||
void Controller::shutdownhushd()
|
||||
{
|
||||
// Signal Rust to stop background threads (mempool monitor, etc.)
|
||||
litelib_shutdown();
|
||||
|
||||
// Save the wallet and exit the lightclient library cleanly.
|
||||
if (!zrpc) {
|
||||
zrpc = new LiteInterface();
|
||||
@@ -2040,7 +2044,7 @@ void Controller::shutdownhushd()
|
||||
connD.topIcon->setMovie(movie2);
|
||||
movie2->start();
|
||||
connD.status->setText(QObject::tr("Please wait for SilentDragonXLite to exit"));
|
||||
connD.statusDetail->setText(QObject::tr("It may take several minutes"));
|
||||
connD.statusDetail->setText(QObject::tr("Saving wallet..."));
|
||||
} else {
|
||||
QMovie *movie1 = new QMovie(":/img/res/silentdragonxlite-animated-startup-dark.gif");;
|
||||
movie1->setScaledSize(size);
|
||||
@@ -2048,7 +2052,7 @@ void Controller::shutdownhushd()
|
||||
connD.topIcon->setMovie(movie1);
|
||||
movie1->start();
|
||||
connD.status->setText(QObject::tr("Please wait for SilentDragonXLite to exit"));
|
||||
connD.statusDetail->setText(QObject::tr("It may take several minutes"));
|
||||
connD.statusDetail->setText(QObject::tr("Saving wallet..."));
|
||||
}
|
||||
|
||||
bool finished = false;
|
||||
@@ -2059,6 +2063,15 @@ void Controller::shutdownhushd()
|
||||
qDebug() << __func__ << ": saveWallet finished";
|
||||
});
|
||||
|
||||
// Add a timeout so the dialog can't hang forever
|
||||
QTimer::singleShot(15000, &d, [&]() {
|
||||
if (!finished) {
|
||||
qDebug() << __func__ << ": saveWallet timed out after 15 seconds, forcing exit";
|
||||
finished = true;
|
||||
d.accept();
|
||||
}
|
||||
});
|
||||
|
||||
if (!finished)
|
||||
d.exec();
|
||||
} else {
|
||||
|
||||
@@ -412,7 +412,7 @@ bool NewSeedPage::validatePage() {
|
||||
QObject::connect(verifyseed.word1, &QPushButton::clicked, [&] () {
|
||||
|
||||
verifyseed.verify->insertPlainText(word1 + " ");
|
||||
verifyseed.word1->setStyleSheet("background-color: rgb(182,182,182);");
|
||||
verifyseed.word1->setStyleSheet("background-color: rgba(216, 38, 82, 0.3); color: rgba(255,255,255,0.5);");
|
||||
QFont button = verifyseed.word1->font();
|
||||
button.setStrikeOut(true);
|
||||
verifyseed.word1->setFont(button);
|
||||
@@ -421,7 +421,7 @@ bool NewSeedPage::validatePage() {
|
||||
QObject::connect(verifyseed.word2, &QPushButton::clicked, [&] () {
|
||||
|
||||
verifyseed.verify->insertPlainText(word2);
|
||||
verifyseed.word2->setStyleSheet("background-color: rgb(182,182,182);");
|
||||
verifyseed.word2->setStyleSheet("background-color: rgba(216, 38, 82, 0.3); color: rgba(255,255,255,0.5);");
|
||||
QFont button = verifyseed.word2->font();
|
||||
button.setStrikeOut(true);
|
||||
verifyseed.word2->setFont(button);
|
||||
@@ -430,7 +430,7 @@ bool NewSeedPage::validatePage() {
|
||||
QObject::connect(verifyseed.word3, &QPushButton::clicked, [&] () {
|
||||
|
||||
verifyseed.verify->insertPlainText(word3 + " ");
|
||||
verifyseed.word3->setStyleSheet("background-color: rgb(182,182,182);");
|
||||
verifyseed.word3->setStyleSheet("background-color: rgba(216, 38, 82, 0.3); color: rgba(255,255,255,0.5);");
|
||||
QFont button = verifyseed.word3->font();
|
||||
button.setStrikeOut(true);
|
||||
verifyseed.word3->setFont(button);
|
||||
@@ -439,7 +439,7 @@ bool NewSeedPage::validatePage() {
|
||||
QObject::connect(verifyseed.word4, &QPushButton::clicked, [&] () {
|
||||
|
||||
verifyseed.verify->insertPlainText(word4 + " ");
|
||||
verifyseed.word4->setStyleSheet("background-color: rgb(182,182,182);");
|
||||
verifyseed.word4->setStyleSheet("background-color: rgba(216, 38, 82, 0.3); color: rgba(255,255,255,0.5);");
|
||||
QFont button = verifyseed.word4->font();
|
||||
button.setStrikeOut(true);
|
||||
verifyseed.word4->setFont(button);
|
||||
@@ -448,7 +448,7 @@ bool NewSeedPage::validatePage() {
|
||||
QObject::connect(verifyseed.word5, &QPushButton::clicked, [&] () {
|
||||
|
||||
verifyseed.verify->insertPlainText(word5 + " ");
|
||||
verifyseed.word5->setStyleSheet("background-color: rgb(182,182,182);");
|
||||
verifyseed.word5->setStyleSheet("background-color: rgba(216, 38, 82, 0.3); color: rgba(255,255,255,0.5);");
|
||||
QFont button = verifyseed.word5->font();
|
||||
button.setStrikeOut(true);
|
||||
verifyseed.word5->setFont(button);
|
||||
@@ -457,7 +457,7 @@ bool NewSeedPage::validatePage() {
|
||||
QObject::connect(verifyseed.word6, &QPushButton::clicked, [&] () {
|
||||
|
||||
verifyseed.verify->insertPlainText(word6 + " ");
|
||||
verifyseed.word6->setStyleSheet("background-color: rgb(182,182,182);");
|
||||
verifyseed.word6->setStyleSheet("background-color: rgba(216, 38, 82, 0.3); color: rgba(255,255,255,0.5);");
|
||||
QFont button = verifyseed.word6->font();
|
||||
button.setStrikeOut(true);
|
||||
verifyseed.word6->setFont(button);
|
||||
@@ -466,7 +466,7 @@ bool NewSeedPage::validatePage() {
|
||||
QObject::connect(verifyseed.word7, &QPushButton::clicked, [&] () {
|
||||
|
||||
verifyseed.verify->insertPlainText(word7 + " ");
|
||||
verifyseed.word7->setStyleSheet("background-color: rgb(182,182,182);");
|
||||
verifyseed.word7->setStyleSheet("background-color: rgba(216, 38, 82, 0.3); color: rgba(255,255,255,0.5);");
|
||||
QFont button = verifyseed.word7->font();
|
||||
button.setStrikeOut(true);
|
||||
verifyseed.word7->setFont(button);
|
||||
@@ -475,7 +475,7 @@ bool NewSeedPage::validatePage() {
|
||||
QObject::connect(verifyseed.word8, &QPushButton::clicked, [&] () {
|
||||
|
||||
verifyseed.verify->insertPlainText(word8 + " ");
|
||||
verifyseed.word8->setStyleSheet("background-color: rgb(182,182,182);");
|
||||
verifyseed.word8->setStyleSheet("background-color: rgba(216, 38, 82, 0.3); color: rgba(255,255,255,0.5);");
|
||||
QFont button = verifyseed.word8->font();
|
||||
button.setStrikeOut(true);
|
||||
verifyseed.word8->setFont(button);
|
||||
@@ -484,7 +484,7 @@ bool NewSeedPage::validatePage() {
|
||||
QObject::connect(verifyseed.word9, &QPushButton::clicked, [&] () {
|
||||
|
||||
verifyseed.verify->insertPlainText(word9 + " ");
|
||||
verifyseed.word9->setStyleSheet("background-color: rgb(182,182,182);");
|
||||
verifyseed.word9->setStyleSheet("background-color: rgba(216, 38, 82, 0.3); color: rgba(255,255,255,0.5);");
|
||||
QFont button = verifyseed.word9->font();
|
||||
button.setStrikeOut(true);
|
||||
verifyseed.word9->setFont(button);
|
||||
@@ -493,7 +493,7 @@ bool NewSeedPage::validatePage() {
|
||||
QObject::connect(verifyseed.word10, &QPushButton::clicked, [&] () {
|
||||
|
||||
verifyseed.verify->insertPlainText(word10 + " ");
|
||||
verifyseed.word10->setStyleSheet("background-color: rgb(182,182,182);");
|
||||
verifyseed.word10->setStyleSheet("background-color: rgba(216, 38, 82, 0.3); color: rgba(255,255,255,0.5);");
|
||||
QFont button = verifyseed.word10->font();
|
||||
button.setStrikeOut(true);
|
||||
verifyseed.word10->setFont(button);
|
||||
@@ -502,7 +502,7 @@ bool NewSeedPage::validatePage() {
|
||||
QObject::connect(verifyseed.word11, &QPushButton::clicked, [&] () {
|
||||
|
||||
verifyseed.verify->insertPlainText(word11 + " ");
|
||||
verifyseed.word11->setStyleSheet("background-color: rgb(182,182,182);");
|
||||
verifyseed.word11->setStyleSheet("background-color: rgba(216, 38, 82, 0.3); color: rgba(255,255,255,0.5);");
|
||||
QFont button = verifyseed.word11->font();
|
||||
button.setStrikeOut(true);
|
||||
verifyseed.word11->setFont(button);
|
||||
@@ -511,7 +511,7 @@ bool NewSeedPage::validatePage() {
|
||||
QObject::connect(verifyseed.word12, &QPushButton::clicked, [&] () {
|
||||
|
||||
verifyseed.verify->insertPlainText(word12 + " ");
|
||||
verifyseed.word12->setStyleSheet("background-color: rgb(182,182,182);");
|
||||
verifyseed.word12->setStyleSheet("background-color: rgba(216, 38, 82, 0.3); color: rgba(255,255,255,0.5);");
|
||||
QFont button = verifyseed.word12->font();
|
||||
button.setStrikeOut(true);
|
||||
verifyseed.word12->setFont(button);
|
||||
@@ -520,7 +520,7 @@ bool NewSeedPage::validatePage() {
|
||||
QObject::connect(verifyseed.word13, &QPushButton::clicked, [&] () {
|
||||
|
||||
verifyseed.verify->insertPlainText(word13 + " ");
|
||||
verifyseed.word13->setStyleSheet("background-color: rgb(182,182,182);");
|
||||
verifyseed.word13->setStyleSheet("background-color: rgba(216, 38, 82, 0.3); color: rgba(255,255,255,0.5);");
|
||||
QFont button = verifyseed.word13->font();
|
||||
button.setStrikeOut(true);
|
||||
verifyseed.word13->setFont(button);
|
||||
@@ -529,7 +529,7 @@ bool NewSeedPage::validatePage() {
|
||||
QObject::connect(verifyseed.word14, &QPushButton::clicked, [&] () {
|
||||
|
||||
verifyseed.verify->insertPlainText(word14 + " ");
|
||||
verifyseed.word14->setStyleSheet("background-color: rgb(182,182,182);");
|
||||
verifyseed.word14->setStyleSheet("background-color: rgba(216, 38, 82, 0.3); color: rgba(255,255,255,0.5);");
|
||||
QFont button = verifyseed.word14->font();
|
||||
button.setStrikeOut(true);
|
||||
verifyseed.word14->setFont(button);
|
||||
@@ -538,7 +538,7 @@ bool NewSeedPage::validatePage() {
|
||||
QObject::connect(verifyseed.word15, &QPushButton::clicked, [&] () {
|
||||
|
||||
verifyseed.verify->insertPlainText(word15 + " ");
|
||||
verifyseed.word15->setStyleSheet("background-color: rgb(182,182,182);");
|
||||
verifyseed.word15->setStyleSheet("background-color: rgba(216, 38, 82, 0.3); color: rgba(255,255,255,0.5);");
|
||||
QFont button = verifyseed.word15->font();
|
||||
button.setStrikeOut(true);
|
||||
verifyseed.word15->setFont(button);
|
||||
@@ -547,7 +547,7 @@ bool NewSeedPage::validatePage() {
|
||||
QObject::connect(verifyseed.word16, &QPushButton::clicked, [&] () {
|
||||
|
||||
verifyseed.verify->insertPlainText(word16 + " ");
|
||||
verifyseed.word16->setStyleSheet("background-color: rgb(182,182,182);");
|
||||
verifyseed.word16->setStyleSheet("background-color: rgba(216, 38, 82, 0.3); color: rgba(255,255,255,0.5);");
|
||||
QFont button = verifyseed.word16->font();
|
||||
button.setStrikeOut(true);
|
||||
verifyseed.word16->setFont(button);
|
||||
@@ -556,7 +556,7 @@ bool NewSeedPage::validatePage() {
|
||||
QObject::connect(verifyseed.word17, &QPushButton::clicked, [&] () {
|
||||
|
||||
verifyseed.verify->insertPlainText(word17 + " ");
|
||||
verifyseed.word17->setStyleSheet("background-color: rgb(182,182,182);");
|
||||
verifyseed.word17->setStyleSheet("background-color: rgba(216, 38, 82, 0.3); color: rgba(255,255,255,0.5);");
|
||||
QFont button = verifyseed.word17->font();
|
||||
button.setStrikeOut(true);
|
||||
verifyseed.word17->setFont(button);
|
||||
@@ -565,7 +565,7 @@ bool NewSeedPage::validatePage() {
|
||||
QObject::connect(verifyseed.word18, &QPushButton::clicked, [&] () {
|
||||
|
||||
verifyseed.verify->insertPlainText(word18 + " ");
|
||||
verifyseed.word18->setStyleSheet("background-color: rgb(182,182,182);");
|
||||
verifyseed.word18->setStyleSheet("background-color: rgba(216, 38, 82, 0.3); color: rgba(255,255,255,0.5);");
|
||||
QFont button = verifyseed.word18->font();
|
||||
button.setStrikeOut(true);
|
||||
verifyseed.word18->setFont(button);
|
||||
@@ -574,7 +574,7 @@ bool NewSeedPage::validatePage() {
|
||||
QObject::connect(verifyseed.word19, &QPushButton::clicked, [&] () {
|
||||
|
||||
verifyseed.verify->insertPlainText(word19 + " ");
|
||||
verifyseed.word19->setStyleSheet("background-color: rgb(182,182,182);");
|
||||
verifyseed.word19->setStyleSheet("background-color: rgba(216, 38, 82, 0.3); color: rgba(255,255,255,0.5);");
|
||||
QFont button = verifyseed.word19->font();
|
||||
button.setStrikeOut(true);
|
||||
verifyseed.word19->setFont(button);
|
||||
@@ -583,7 +583,7 @@ bool NewSeedPage::validatePage() {
|
||||
QObject::connect(verifyseed.word20, &QPushButton::clicked, [&] () {
|
||||
|
||||
verifyseed.verify->insertPlainText(word20 + " ");
|
||||
verifyseed.word20->setStyleSheet("background-color: rgb(182,182,182);");
|
||||
verifyseed.word20->setStyleSheet("background-color: rgba(216, 38, 82, 0.3); color: rgba(255,255,255,0.5);");
|
||||
QFont button = verifyseed.word20->font();
|
||||
button.setStrikeOut(true);
|
||||
verifyseed.word20->setFont(button);
|
||||
@@ -592,7 +592,7 @@ bool NewSeedPage::validatePage() {
|
||||
QObject::connect(verifyseed.word21, &QPushButton::clicked, [&] () {
|
||||
|
||||
verifyseed.verify->insertPlainText(word21 + " ");
|
||||
verifyseed.word21->setStyleSheet("background-color: rgb(182,182,182);");
|
||||
verifyseed.word21->setStyleSheet("background-color: rgba(216, 38, 82, 0.3); color: rgba(255,255,255,0.5);");
|
||||
QFont button = verifyseed.word21->font();
|
||||
button.setStrikeOut(true);
|
||||
verifyseed.word21->setFont(button);
|
||||
@@ -601,7 +601,7 @@ bool NewSeedPage::validatePage() {
|
||||
QObject::connect(verifyseed.word22, &QPushButton::clicked, [&] () {
|
||||
|
||||
verifyseed.verify->insertPlainText(word22 + " ");
|
||||
verifyseed.word22->setStyleSheet("background-color: rgb(182,182,182);");
|
||||
verifyseed.word22->setStyleSheet("background-color: rgba(216, 38, 82, 0.3); color: rgba(255,255,255,0.5);");
|
||||
QFont button = verifyseed.word22->font();
|
||||
button.setStrikeOut(true);
|
||||
verifyseed.word22->setFont(button);
|
||||
@@ -610,7 +610,7 @@ bool NewSeedPage::validatePage() {
|
||||
QObject::connect(verifyseed.word23, &QPushButton::clicked, [&] () {
|
||||
|
||||
verifyseed.verify->insertPlainText(word23 + " ");
|
||||
verifyseed.word23->setStyleSheet("background-color: rgb(182,182,182);");
|
||||
verifyseed.word23->setStyleSheet("background-color: rgba(216, 38, 82, 0.3); color: rgba(255,255,255,0.5);");
|
||||
QFont button = verifyseed.word23->font();
|
||||
button.setStrikeOut(true);
|
||||
verifyseed.word23->setFont(button);
|
||||
@@ -619,7 +619,7 @@ bool NewSeedPage::validatePage() {
|
||||
QObject::connect(verifyseed.word24, &QPushButton::clicked, [&] () {
|
||||
|
||||
verifyseed.verify->insertPlainText(word24 + " ");
|
||||
verifyseed.word24->setStyleSheet("background-color: rgb(182,182,182);");
|
||||
verifyseed.word24->setStyleSheet("background-color: rgba(216, 38, 82, 0.3); color: rgba(255,255,255,0.5);");
|
||||
QFont button = verifyseed.word24->font();
|
||||
button.setStrikeOut(true);
|
||||
verifyseed.word24->setFont(button);
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Ubuntu'; font-size:11pt; font-weight:400; font-style:normal;">
|
||||
<h1 align="center" style=" margin-top:18px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:xx-large; font-weight:600;">DragonX + HushChat Terms of Service</span></h1>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All users of this platform agree to not use it for initiating or threatening any forceful interference or violence on an individual or their property, aka, the <a href="https://en.wikipedia.org/wiki/Non-aggression_principle"><span style=" text-decoration: underline; color:#0000ff;">Non-Aggression Principle</span></a>.</p>
|
||||
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">All users of this platform agree to not use it for initiating or threatening any forceful interference or violence on an individual or their property, aka, the <a href="https://en.wikipedia.org/wiki/Non-aggression_principle"><span style=" text-decoration: underline; color:#6699ff;">Non-Aggression Principle</span></a>.</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">THE SERVICE IS PROVIDED “AS IS” AND The Hush Developers DO NOT MAKE ANY SPECIFIC COMMITMENTS OR WARRANTIES ABOUT THE SERVICE.</p>
|
||||
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">By clicking OK, you agree to use Hush, the SilentDragon family of wallets, HushChat, and any software developed by The Hush Developers in accordance with your local laws, that all liabilities related to using this service are your own, and The Hush Developers WILL NOT BE RESPONSIBLE FOR any losses related to using this software.</p>
|
||||
|
||||
Reference in New Issue
Block a user