updated css for dragonx theme and added as option to settings menu

This commit is contained in:
dan_s
2024-05-08 23:21:51 -05:00
parent 573fba9ba0
commit 0865358171
14 changed files with 521 additions and 96 deletions

View File

@@ -71,7 +71,7 @@ MainWindow::MainWindow(QWidget *parent) :
}
catch (...)
{
theme_name = "Dark";
theme_name = "dragonx";
}
this->slot_change_theme(theme_name);
@@ -1486,7 +1486,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" || theme == "dragonx") {
QPixmap send(":/icons/res/send-white.png");
QIcon sendIcon(send);
ui->sendChatButton->setIcon(sendIcon);
@@ -2003,7 +2003,7 @@ void MainWindow::sendMoneyChat() {
movie1->setFileName(":/img/res/loaderwhite.gif");
auto theme = Settings::getInstance()->get_theme_name();
if (theme == "Dark" || theme == "Midnight") {
if (theme == "Dark" || theme == "Midnight" || theme == "dragonx") {
connect(movie, &QMovie::frameChanged, [=]{
ui->sendChatButton->setIcon(movie->currentPixmap());
@@ -2033,7 +2033,7 @@ void MainWindow::sendMoneyChat() {
QTimer::singleShot(1000, [=]() {
if (theme == "Dark" || theme == "Midnight") {
if (theme == "Dark" || theme == "Midnight" || theme == "dragonx") {
QPixmap send(":/icons/res/send-white.png");
QIcon sendIcon(send);
ui->sendChatButton->setIcon(sendIcon);
@@ -2071,7 +2071,7 @@ void MainWindow::sendMoneyChat() {
ui->memoTxtChat->setEnabled(true);
if (theme == "Dark" || theme == "Midnight") {
if (theme == "Dark" || theme == "Midnight" || theme == "dragonx") {
QPixmap send(":/icons/res/send-white.png");
QIcon sendIcon(send);
ui->sendChatButton->setIcon(sendIcon);
@@ -2292,7 +2292,7 @@ void MainWindow::sendMoneyRequestChat() {
movie1->setFileName(":/img/res/loaderwhite.gif");
auto theme = Settings::getInstance()->get_theme_name();
if (theme == "Dark" || theme == "Midnight") {
if (theme == "Dark" || theme == "Midnight" || theme == "dragonx") {
connect(movie, &QMovie::frameChanged, [=]{
ui->sendChatButton->setIcon(movie->currentPixmap());
@@ -2321,7 +2321,7 @@ void MainWindow::sendMoneyRequestChat() {
QTimer::singleShot(1000, [=]() {
if (theme == "Dark" || theme == "Midnight") {
if (theme == "Dark" || theme == "Midnight" || theme == "dragonx") {
QPixmap send(":/icons/res/send-white.png");
QIcon sendIcon(send);
ui->sendChatButton->setIcon(sendIcon);
@@ -2354,7 +2354,7 @@ void MainWindow::sendMoneyRequestChat() {
movie->stop();
if (theme == "Dark" || theme == "Midnight") {
if (theme == "Dark" || theme == "Midnight" || theme == "dragonx") {
QPixmap send(":/icons/res/send-white.png");
QIcon sendIcon(send);
ui->sendChatButton->setIcon(sendIcon);
@@ -2692,7 +2692,7 @@ void MainWindow::slot_change_theme(const QString& theme_name) {
Settings::getInstance()->set_theme_name(theme_name);
} else {
qDebug() << __func__ << ": ignoring invalid theme_name=" << theme_name;
Settings::getInstance()->set_theme_name("Dark");
Settings::getInstance()->set_theme_name("dragonx");
}
// Include css
@@ -2701,7 +2701,7 @@ void MainWindow::slot_change_theme(const QString& theme_name) {
saved_theme_name = Settings::getInstance()->get_theme_name();
} catch (const std::exception& e) {
qDebug() << QString("Ignoring theme change Exception! : ");
saved_theme_name = "Dark";
saved_theme_name = "dragonx";
}
QString filename = ":/css/res/css/" + saved_theme_name +".css";