updated css for dragonx theme and added as option to settings menu
This commit is contained in:
@@ -105,7 +105,7 @@ QVariant BalancesTableModel::data(const QModelIndex &index, int role) const
|
||||
QString theme_name = Settings::getInstance()->get_theme_name();
|
||||
QBrush b;
|
||||
QColor color;
|
||||
if (theme_name == "Dark" || theme_name == "Midnight") {
|
||||
if (theme_name == "Dark" || theme_name == "Midnight" || theme_name == "dragonx") {
|
||||
color = COLOR_WHITE;
|
||||
}else{
|
||||
color = COLOR_BLACK;
|
||||
|
||||
@@ -97,7 +97,7 @@ void MainWindow::renderContactRequest(){
|
||||
|
||||
QString icon;
|
||||
auto theme = Settings::getInstance()->get_theme_name();
|
||||
if (theme == "Dark" || theme == "Midnight") {
|
||||
if (theme == "Dark" || theme == "Midnight" || theme == "dragonx") {
|
||||
icon = ":/icons/res/unknownWhite.png";
|
||||
}else{
|
||||
icon = ":/icons/res/unknownBlack.png";
|
||||
@@ -571,7 +571,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" || theme == "dragonx") {
|
||||
|
||||
connect(movie, &QMovie::frameChanged, [=]{
|
||||
ui->sendChatButton->setIcon(movie->currentPixmap());
|
||||
@@ -603,7 +603,7 @@ void MainWindow::sendChat() {
|
||||
|
||||
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);
|
||||
@@ -640,7 +640,7 @@ void MainWindow::sendChat() {
|
||||
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);
|
||||
@@ -870,7 +870,7 @@ void MainWindow::ContactRequest() {
|
||||
QMovie *movie1 = new QMovie(":/img/res/silentdragonxlite-animated-startup-dark.gif");
|
||||
QMovie *movie2 = new QMovie(":/img/res/silentdragonxlite-animated-startup-dark.gif");
|
||||
auto theme = Settings::getInstance()->get_theme_name();
|
||||
if (theme == "Dark" || theme == "Midnight") {
|
||||
if (theme == "Dark" || theme == "Midnight" || theme == "dragonx") {
|
||||
movie2->setScaledSize(QSize(512,512));
|
||||
connD->topIcon->setMovie(movie2);
|
||||
movie2->start();
|
||||
|
||||
@@ -37,7 +37,7 @@ ConnectionLoader::ConnectionLoader(MainWindow* main, Controller* rpc)
|
||||
//DEBUG("theme " << theme << " has loaded");
|
||||
auto size = QSize(512,512);
|
||||
|
||||
if (theme == "Dark" || theme == "Midnight") {
|
||||
if (theme == "Dark" || theme == "Midnight" || theme == "dragonx") {
|
||||
QMovie *movie2 = new QMovie(":/img/res/silentdragonxlite-animated-startup-dark.gif");;
|
||||
movie2->setScaledSize(size);
|
||||
qDebug() << "Animation dark loaded";
|
||||
|
||||
@@ -2032,7 +2032,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" || theme == "dragonx") {
|
||||
QMovie *movie2 = new QMovie(":/img/res/silentdragonxlite-animated-startup-dark.gif");;
|
||||
movie2->setScaledSize(size);
|
||||
qDebug() << "Animation dark loaded";
|
||||
|
||||
@@ -28,12 +28,10 @@ void FilledIconLabel::resizeEvent(QResizeEvent*) {
|
||||
color = COLOR_BLUE_BG;
|
||||
}else if(theme_name == "Light"){
|
||||
color = COLOR_LIGHT_BG;
|
||||
}else if(theme_name == "Dark"){
|
||||
}else if(theme_name == "Dark" || theme_name == "dragonx"){
|
||||
color = COLOR_DARK_BG;
|
||||
}else if(theme_name =="Midnight"){
|
||||
color = COLOR_MIDNIGHT_BG;
|
||||
}else if(theme_name =="dragonx"){
|
||||
color = COLOR_DRAGONX_BG;
|
||||
}else{
|
||||
color = COLOR_DEFAULT_BG;
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ void FirstTimeWizard::slot_change_theme(const QString& theme_name) {
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
saved_theme_name = "Dark";
|
||||
saved_theme_name = "dragonx";
|
||||
}
|
||||
|
||||
QFile qFile(":/css/res/css/" + saved_theme_name +".css");
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -864,7 +864,7 @@ void MainWindow::sendButton() {
|
||||
QMovie *movie1 = new QMovie(":/img/res/silentdragonxlite-animated-startup-dark.gif");;
|
||||
QMovie *movie2 = new QMovie(":/img/res/silentdragonxlite-animated-startup-dark.gif");;
|
||||
auto theme = Settings::getInstance()->get_theme_name();
|
||||
if (theme == "Dark" || theme == "Midnight") {
|
||||
if (theme == "Dark" || theme == "Midnight" || theme == "dragonx") {
|
||||
movie2->setScaledSize(QSize(512,512));
|
||||
connD->topIcon->setMovie(movie2);
|
||||
movie2->start();
|
||||
|
||||
@@ -277,7 +277,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", "dragonx").toString();
|
||||
}
|
||||
|
||||
void Settings::set_theme_name(QString theme_name) {
|
||||
|
||||
@@ -127,6 +127,11 @@
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>dragonx</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Dark</string>
|
||||
@@ -152,6 +157,7 @@
|
||||
<string>Default</string>
|
||||
</property>
|
||||
</item>
|
||||
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="chkFetchPrices">
|
||||
<property name="geometry">
|
||||
|
||||
@@ -93,7 +93,7 @@ QVariant TxTableModel::data(const QModelIndex &index, int role) const {
|
||||
QString theme_name = Settings::getInstance()->get_theme_name();
|
||||
QBrush b;
|
||||
QColor color;
|
||||
if (theme_name == "Dark" || theme_name == "Midnight") {
|
||||
if (theme_name == "Dark" || theme_name == "Midnight" || theme_name == "dragonx") {
|
||||
color = COLOR_WHITE;
|
||||
}else{
|
||||
color = COLOR_BLACK;
|
||||
|
||||
Reference in New Issue
Block a user