diff --git a/application.qrc b/application.qrc index 345aac4..e6c1b2d 100644 --- a/application.qrc +++ b/application.qrc @@ -47,7 +47,6 @@ res/addContactBlack.png res/unknownBlack.png res/unknownWhite.png - res/hushdlogo.gif @@ -59,21 +58,21 @@ res/loaderwhite.gif - res/silentdragonlite_de.qm - res/silentdragonlite_es.qm - res/silentdragonlite_fr.qm - res/silentdragonlite_pt.qm - res/silentdragonlite_it.qm - res/silentdragonlite_hr.qm - res/silentdragonlite_fa.qm - res/silentdragonlite_id.qm + res/silentdragonlite_de.qm + res/silentdragonlite_es.qm + res/silentdragonlite_fr.qm + res/silentdragonlite_pt.qm + res/silentdragonlite_it.qm + res/silentdragonlite_hr.qm + res/silentdragonlite_fa.qm + res/silentdragonlite_id.qm - res/css/blue.css - res/css/dark.css - res/css/default.css - res/css/light.css - res/css/midnight.css + res/css/Blue.css + res/css/Dark.css + res/css/Default.css + res/css/Light.css + res/css/Midnight.css res/images/blue/unchecked.png diff --git a/res/css/blue.css b/res/css/Blue.css similarity index 100% rename from res/css/blue.css rename to res/css/Blue.css diff --git a/res/css/dark.css b/res/css/Dark.css similarity index 100% rename from res/css/dark.css rename to res/css/Dark.css diff --git a/res/css/default.css b/res/css/Default.css similarity index 100% rename from res/css/default.css rename to res/css/Default.css diff --git a/res/css/light.css b/res/css/Light.css similarity index 100% rename from res/css/light.css rename to res/css/Light.css diff --git a/res/css/midnight.css b/res/css/Midnight.css similarity index 100% rename from res/css/midnight.css rename to res/css/Midnight.css diff --git a/src/chatmodel.cpp b/src/chatmodel.cpp index c3f5f08..fe4e92b 100644 --- a/src/chatmodel.cpp +++ b/src/chatmodel.cpp @@ -101,7 +101,7 @@ void MainWindow::renderContactRequest(){ QString icon; auto theme = Settings::getInstance()->get_theme_name(); - if (theme == "dark" || theme == "midnight") { + if (theme == "Dark" || theme == "Midnight") { icon = ":/icons/res/unknownWhite.png"; }else{ icon = ":/icons/res/unknownBlack.png"; @@ -587,7 +587,7 @@ void MainWindow::sendChat() { movie1->setFileName(":/img/res/loaderwhite.gif"); auto theme = Settings::getInstance()->get_theme_name(); - if (theme == "dark" || theme == "midnight") { + if (theme == "Dark" || theme == "Midnight") { connect(movie, &QMovie::frameChanged, [=]{ ui->sendChatButton->setIcon(movie->currentPixmap()); @@ -616,7 +616,7 @@ void MainWindow::sendChat() { QTimer::singleShot(1000, [=]() { - if (theme == "dark" || theme == "midnight") { + if (theme == "Dark" || theme == "Midnight") { QPixmap send(":/icons/res/send-white.png"); QIcon sendIcon(send); ui->sendChatButton->setIcon(sendIcon); @@ -649,7 +649,7 @@ void MainWindow::sendChat() { movie->stop(); - if (theme == "dark" || theme == "midnight") { + if (theme == "Dark" || theme == "Midnight") { QPixmap send(":/icons/res/send-white.png"); QIcon sendIcon(send); ui->sendChatButton->setIcon(sendIcon); @@ -881,7 +881,7 @@ void MainWindow::ContactRequest() { QMovie *movie1 = new QMovie(":/img/res/silentdragonlite-animated.gif"); QMovie *movie2 = new QMovie(":/img/res/silentdragonlite-animated-dark.gif"); auto theme = Settings::getInstance()->get_theme_name(); - if (theme == "dark" || theme == "midnight") { + if (theme == "Dark" || theme == "Midnight") { movie2->setScaledSize(QSize(512,512)); connD->topIcon->setMovie(movie2); movie2->start(); diff --git a/src/connection.cpp b/src/connection.cpp index bbc3bce..569ebed 100644 --- a/src/connection.cpp +++ b/src/connection.cpp @@ -23,7 +23,7 @@ ConnectionLoader::ConnectionLoader(MainWindow* main, Controller* rpc) qDebug() << theme << "theme has loaded"; auto size = QSize(512,512); - if (theme == "dark" || theme == "midnight") { + if (theme == "Dark" || theme == "Midnight") { QMovie *movie2 = new QMovie(":/img/res/silentdragonlite-animated-startup-dark.gif");; movie2->setScaledSize(size); qDebug() << "Animation dark loaded"; diff --git a/src/controller.cpp b/src/controller.cpp index 6bcd569..7cca1a7 100644 --- a/src/controller.cpp +++ b/src/controller.cpp @@ -2035,7 +2035,7 @@ void Controller::shutdownhushd() auto theme = Settings::getInstance()->get_theme_name(); auto size = QSize(512,512); - if (theme == "dark" || theme == "midnight") { + if (theme == "Dark" || theme == "Midnight") { QMovie *movie2 = new QMovie(":/img/res/silentdragonlite-animated-startup-dark.gif");; movie2->setScaledSize(size); qDebug() << "Animation dark loaded"; diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index c3be452..6eba199 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -66,7 +66,7 @@ MainWindow::MainWindow(QWidget *parent) : } catch (...) { - theme_name = "dark"; + theme_name = "Dark"; } this->slot_change_theme(theme_name); @@ -1213,10 +1213,10 @@ void MainWindow::setupTransactionsTab() { // Set up context menu on transactions tab auto theme = Settings::getInstance()->get_theme_name(); - if (theme == "dark" || theme == "midnight") { + if (theme == "Dark" || theme == "Midnight") { ui->listChat->setStyleSheet("background-image: url(:/icons/res/sdlogo.png) ;background-attachment: fixed ;background-position: center center ;background-repeat: no-repeat;background-size: cover"); } - if (theme == "default") {ui->listChat->setStyleSheet("background-image: url(:/icons/res/sdlogo2.png) ;background-attachment: fixed ;background-position: center center ;background-repeat: no-repeat;background-size: cover");} + if (theme == "Default") {ui->listChat->setStyleSheet("background-image: url(:/icons/res/sdlogo2.png) ;background-attachment: fixed ;background-position: center center ;background-repeat: no-repeat;background-size: cover");} ui->listChat->setResizeMode(QListView::Adjust); ui->listChat->setWordWrap(true); @@ -1316,7 +1316,7 @@ void MainWindow::setupchatTab() { /////////////Setting Icons for Chattab and different themes auto theme = Settings::getInstance()->get_theme_name(); - if (theme == "dark" || theme == "midnight") { + if (theme == "Dark" || theme == "Midnight") { QPixmap send(":/icons/res/send-white.png"); QIcon sendIcon(send); ui->sendChatButton->setIcon(sendIcon); @@ -1955,7 +1955,7 @@ void MainWindow::slot_change_theme(const QString& theme_name) } catch (...) { - saved_theme_name = "dark"; + saved_theme_name = "Dark"; } QFile qFile(":/css/res/css/" + saved_theme_name +".css"); diff --git a/src/sendtab.cpp b/src/sendtab.cpp index 6f3fc11..7e21261 100644 --- a/src/sendtab.cpp +++ b/src/sendtab.cpp @@ -846,7 +846,7 @@ void MainWindow::sendButton() { QMovie *movie1 = new QMovie(":/img/res/silentdragonlite-animated.gif");; QMovie *movie2 = new QMovie(":/img/res/silentdragonlite-animated-dark.gif");; auto theme = Settings::getInstance()->get_theme_name(); - if (theme == "dark" || theme == "midnight") { + if (theme == "Dark" || theme == "Midnight") { movie2->setScaledSize(QSize(512,512)); connD->topIcon->setMovie(movie2); movie2->start(); diff --git a/src/settings.cpp b/src/settings.cpp index dfe1e11..fd47f76 100644 --- a/src/settings.cpp +++ b/src/settings.cpp @@ -230,7 +230,7 @@ void Settings::set_currency_name(QString currency_name) { QString Settings::get_theme_name() { // Load from the QT Settings. - return QSettings().value("options/theme_name", "dark").toString(); + return QSettings().value("options/theme_name", "Dark").toString(); } void Settings::set_theme_name(QString theme_name) { diff --git a/src/settings.ui b/src/settings.ui index ac730fb..57620e5 100644 --- a/src/settings.ui +++ b/src/settings.ui @@ -6,10 +6,28 @@ 0 0 - 733 - 539 + 590 + 443 + + + 0 + 0 + + + + + 590 + 443 + + + + + 590 + 443 + + Settings @@ -85,7 +103,7 @@ 80 110 - 80 + 111 25 @@ -97,27 +115,27 @@ - dark + Dark - default + Midnight - blue + Light - light + Blue - midnight + Default @@ -241,7 +259,7 @@ 80 150 - 80 + 111 25