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

BIN
SilentDragonXLite Executable file

Binary file not shown.

View File

@@ -103,7 +103,7 @@
<file>res/css/Default.css</file> <file>res/css/Default.css</file>
<file>res/css/Light.css</file> <file>res/css/Light.css</file>
<file>res/css/Midnight.css</file> <file>res/css/Midnight.css</file>
<file>res/css/test.css</file> <file>res/css/dragonx.css</file>
</qresource> </qresource>
<qresource prefix="/images/blue"> <qresource prefix="/images/blue">
<file>res/images/blue/unchecked.png</file> <file>res/images/blue/unchecked.png</file>

View File

@@ -1,114 +1,535 @@
/*
colors
background: rgb(24, 12, 12)
object-background: #45505e
object-background-hover: #1f242b
object-background-press: #0c0e11
text-main: white
text-secondary: rgba(255, 255, 255, 0.75)
text-dark: rgb(24, 12, 12)
border: rgb(216, 38, 82)
*/
QWidget, QMainWindow, QMenuBar, QMenu, QDialog, QTabWidget, QTableView, QScrollArea, QGroupBox, QPlainTextEdit, QLineEdit, QLabel, MainWindow { QWidget, QMainWindow, QMenuBar, QMenu, QDialog, QTabWidget, QTableView, QScrollArea, QGroupBox, QPlainTextEdit, QLineEdit, QLabel, MainWindow {
background-color: #232834; color: white;
color: #91a4b8; border: 0px solid rgba(0, 0, 0, 0);
background-color: rgb(24, 21, 21);
} }
/* window menu options */
QMenu {
color: white;
border: 1px solid rgba(216, 38, 82, .5);
border-radius: 8px;
background-color: rgba(24, 21, 21, 1);
}
QMenuBar {
color: rgb(216, 38, 82);
color: white;
}
QMenuBar::item {
color: rgb(216, 38, 82);
color: white;
}
#title {
margin-bottom: 8px;
}
QTabWidget QTabBar {
background-color: rgba(41, 21, 21, .25);
width: 600px;
}
QTabWidget QTabBar::tab { QTabWidget QTabBar::tab {
padding-left:20px; margin: 12px 4px;
padding-right:20px; padding: 6px 4px;
padding-top:5px; font-size: 20px;
padding-bottom:5px; border: 0px solid white;
border: 1px solid #343F4B; border-radius: 9px;
background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #343F4B, stop: 1 #232834); background-color: rgba(41, 21, 21, 1);
min-width: 130px;
} }
QTabWidget QTabBar::tab::last {
min-width: 280px;
}
QTabWidget QTabBar::tab:selected { QTabWidget QTabBar::tab:selected {
min-height: 10px; color: rgba(255, 255, 255, 0.85);
background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #343F4B, stop: 1 #232834); border: 1px solid rgba(216, 38, 82, 0.85);
color:#91a4b8; background-color: rgba(216, 38, 82, 0.25);
border: 1px ridge #91a4b8;
} }
QTabWidget QTabBar::tab:hover { QTabWidget QTabBar::tab:hover {
background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #343F4B, stop: 1 #232834); color: white;
color:#91a4b8; border: 1px solid rgba(216, 38, 82, 1);
border: 1px ridge #91a4b8; background-color: rgba(216, 38, 82, 0.4);
min-height: 20px
} }
QHeaderView { QHeaderView {
/* Table Header */ /* Table Header */
background-color:#232834; background-color: rgba(0, 0, 0, 0);
} }
QHeaderView::section { QHeaderView::section {
/* Table Header Sections */ /* Table Header Sections */
qproperty-alignment:center; /* qproperty-alignment:center; */
background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #343F4B, stop: 1 #232834);
color:#91a4b8;
min-height:25px; min-height:25px;
font-weight:bold;
font-size:11px;
outline:0; outline:0;
border:1px solid #343F4B;
border-right:1px solid #91a4b8;
border-left:1px solid #91a4b8;
padding-left:5px; padding-left:5px;
padding-right:5px; padding-right:5px;
padding-top:2px; padding-top:2px;
padding-bottom:2px; padding-bottom:2px;
color:#91a4b8;
font-weight:bold;
font-size:11px;
border:1px solid rgb(41, 21, 21);
border-right:1px solid #91a4b8;
border-left:1px solid #91a4b8;
} }
QHeaderView::section:last {
border-right: 0px solid #d7d7d7;
QTabBar {
margin-bottom: 16px;
} }
QScrollArea {
background:transparent; QLabel {
border:0px; color: rgba(255, 255, 255, 0.75);
border: 0px solid rgba(255, 255, 255, 0);
background-color: rgba(255, 255, 255, 0);
} }
QLineEdit {
padding: 2px 4px;
color: white;
border: 1px solid rgb(216, 38, 82);
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
background-color: rgba(41, 21, 21, 0.75);
}
QGroupBox{
padding: 12px;
padding-top: 32px;
background-color: rgba(24, 12, 12, 0.45);
border: 1px solid rgba(216, 38, 82, 0.6);
border-radius: 8px;
font-size: 18px;
}
QGroupBox::title {
padding: 4px 12px;
color: rgba(255, 255, 255, 0.85);
border: 1px solid rgba(216, 38, 82, 0.25);
border-top-left-radius: 8px;
border-bottom-right-radius: 8px;
background-color: rgba(216, 38, 82, 0.05);
}
QGroupBox#groupBox QLabel {
font-size: 16px;
}
QPushButton {
padding: 6px 10px;
color: rgba(255, 255, 255, 0.5);
border: 1px solid rgba(216, 38, 82, 0.5);
border-radius: 4px;
background-color: rgba(216, 38, 82, 0.15);
font-size: 16px;
}
QPushButton:hover {
color: rgba(255, 255, 255, 0.75);
border: 1px solid rgba(216, 38, 82, 0.55);
background-color: rgba(216, 38, 82, 0.45);
}
QPushButton:selected {
color: rgba(255, 255, 255, 0.75);
border: 1px solid rgba(216, 38, 82, 0.75);
background-color: rgba(216, 38, 82, 0.75);
}
QPushButton:disabled {
color: rgba(255, 255, 255, 0.15);
border: 1px solid rgba(216, 38, 82, 0.15);
background-color: rgba(255, 255, 255, 0.796);
opacity: 25%;
}
QComboBox{
margin: 0;
padding: 2px 4px;
border: 1px solid rgba(216, 38, 82, 0.75);
border-radius: 2px;
background-color: rgba(24, 12, 12, 0.5);
}
QScrollArea#sendToScrollArea QWidget {
border: 0px solid rgb(216, 38, 82, 0);
background-color: rgba(24, 12, 12, 0.45);
}
QScrollBar {
border: 0px solid rgba(216, 38, 82, 0);
background-color: rgba(24, 12, 12, 0);
}
QScrollBar:vertical {
width: 22px;
margin: 0 2px;
border: 2px solid rgba(216, 38, 82, 0);
background-color: rgba(0, 0, 0 , 0);
}
QScrollBar::handle:vertical,
QScrollBar::handle:horizontal {
border: 1px solid rgba(216, 38, 82, 1);
border-radius: 6px;
background-color: rgba(216, 38, 82, 0.25);
}
QScrollBar::handle:vertical {
border-radius: 6px;
}
QScrollBar::add-line {
height: 0px;
subcontrol-position: bottom;
subcontrol-origin: margin;
}
QScrollBar::sub-line {
height: 0px;
subcontrol-position: top;
subcontrol-origin: margin;
}
QScrollBar::add-page, QScrollBar::sub-page {
background: none;
}
QComboBox QAbstractItemView {
margin: 0;
padding: 2px 4px;
border: 1px solid rgba(216, 38, 82, 0.75);
border-radius: 2px;
background-color: rgba(24, 12, 12, 0.5);
selection-background-color: rgb(118, 132, 153);
}
QComboBox QAbstractItemView::item{
margin: 0;
padding: 2px 4px;
border: 1px solid rgba(216, 38, 82, 0.25);
border-radius: 2px;
background-color: rgba(24, 12, 12, 0.5);
outline: none;
}
QComboBox QAbstractItemView::item:selected{
margin: 0;
padding: 2px 4px;
border: 1px solid rgba(216, 38, 82, 0.75);
border-radius: 2px;
background-color: rgba(24, 12, 12, 0.5);
outline:none;
}
QComboBox QAbstractItemView::item:hover {
margin: 0;
padding: 2px 4px;
border: 1px solid rgba(216, 38, 82, 0.75);
border-radius: 2px;
background-color: rgba(24, 12, 12, 0.75);
outline:none;
}
QListView{
margin: 0;
padding: 2px 4px;
border: 1px solid rgba(216, 38, 82, 0.75);
border-radius: 2px;
background-color: rgba(24, 12, 12, 0.5);
}
/* TAB 1 - HUSHCHAT */
/* chat window */
QListView#listChat,
QListView#listContactWidget {
border-radius: 8px;
border: 1px solid rgba(216, 38, 82, 0.5);
background-color: rgba(216, 38, 82, 0.05);
}
QPushButton#emojiButton,
QPushButton#pushContact,
QPushButton#safeContactRequest,
QPushButton#givemeZaddr,
QPushButton#sendChatButton {
border-radius: 4px;
}
QLabel#lblMessage {
color: white;
border: 1px solid rgba(216, 38, 82, 0.5);
background-color: rgba(216, 38, 82, 0.05);
}
QLabel#lblMessage{
color: rgb(24, 21, 21);
border: 1px solid rgba(255, 255, 255, 0.5);
background-color: rgba(216, 38, 82, 0.05);
}
/* SEND TAB */
QWidget#tab_2 QLabel{
border: 0px solid white;
background-color: rgba(255, 255, 255, 0);
}
/* MEMO */
QWidget#tab_2 QLabel#MemoTxt1,
QWidget#tab_2 QLabel#MemoTxt2,
QWidget#tab_2 QLabel#MemoTxt3,
QWidget#tab_2 QLabel#MemoTxt4,
QWidget#tab_2 QLabel#MemoTxt5,
QWidget#tab_2 QLabel#MemoTxt6 {
border: 1px solid rgba(216, 38, 82, 0.25);
background-color: rgba(24, 12, 12, 0.25);
border-radius: 4px;
padding: 4px 2px;
}
QWidget#tab_2 QLineEdit {
border: 1px solid rgb(216, 38, 82);
padding: 2px 4px;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
background-color: rgba(24, 12, 12, 0.75);
}
/* From Section */
/* drop down address menu */
AddressCombo {
margin: 0;
padding: 2px 4px;
border: 1px solid rgba(216, 38, 82, 0.75);
border-radius: 2px;
background-color: rgba(24, 12, 12, 0.5);
}
/* Send To Section */
/* Recipient sub-section */
QWidget#tab_2 QGroupBox{
border: 1px solid rgba(216, 38, 82, 0.5);
border-radius: 4px;
background-color: rgba(216, 38, 82, 0.1);
}
QWidget#tab_2 QGroupBox::title {
margin-left: 24px;
font-size: 6px;
border-radius: 0;
border-bottom-right-radius: 4px;
border-bottom-left-radius: 4px;
}
/* To Section */
QWidget#tab_2 QGroupBox#groupBox_3,
QWidget#tab_2 QGroupBox#groupBox_4 {
border: 1px solid rgba(216, 38, 82, 0.6);
border-radius: 8px;
background-color: rgba(24, 12, 12, 0.45);
}
QWidget#tab_2 QGroupBox#groupBox_3::title,
QWidget#tab_2 QGroupBox#groupBox_4::title {
border-radius: 0;
border-top-left-radius: 8px;
border-bottom-right-radius: 8px;
margin: 0;
}
/* Max Available */
QCheckBox#Max1 {
padding: 4px;
border-radius: 4px;
background-color: rgba(24, 12, 12, 0.25);
}
QCheckBox#Max1:hover {
border: 1px solid rgba(216, 38, 82, 0.25);
background-color: rgba(216, 38, 82, 0.25);
}
QCheckBox#Max1:pressed,
QCheckBox#Max1:checked {
border: 1px solid rgba(216, 38, 82, 0.75);
background-color: rgba(216, 38, 82, 0.5);
color: white;
}
QLabel#AmtUSD1,
QLabel#txtAvailableUSD {
border: 0px solid rgba(216, 38, 82, 0.25);
background-color: rgba(255, 255, 255, 0.15);
border-radius: 2px;
}
QWidget#tab_2 QGroupBox#groupBox_4 {
height: 12px;
padding: 0;
margin: 0;
border: 1px solid rgba(216, 38, 82, 0.25);
color: white;
}
QWidget#tab_2 QPushButton {
color: rgba(255, 255, 255, 0.75);
border: 1px solid rgba(216, 38, 82, 0.25);
background-color: rgba(216, 38, 82, 0.25);
}
QWidget#tab_2 QPushButton:hover {
color: rgba(255, 255, 255, 0.75);
border: 1px solid rgba(216, 38, 82, 0.55);
background-color: rgba(216, 38, 82, 0.45);
}
QWidget#tab_2 QPushButton:selected {
color: rgba(255, 255, 255, 1);
border: 1px solid rgba(216, 38, 82, 0.75);
background-color: rgba(216, 38, 82, 0.5);
}
QWidget#tab_2 QPushButton:disabled {
color: rgba(24, 12, 12, 0.75);
border: 1px solid rgba(216, 38, 82, 0.05);
background-color: rgba(255, 255, 255, 0.15);
}
QTableView { QTableView {
/* Table - has to be selected as a class otherwise it throws off QCalendarWidget */ /* Table - has to be selected as a class otherwise it throws off QCalendarWidget */
background:#232834; qproperty-showGrid: "false";
padding-right: 8px;
color: rgba(0, 0, 0, 0);
background-color: rgba(0, 0, 0, 0);
} }
QTableView QTableCornerButton::section {
border: 0px solid rgba(0, 0, 0, 0);
background-color:rgba(0, 0, 0, 0);
}
QTableView::item { QTableView::item {
/* Table Item */ /* Table Item */
background-color:#232834; padding: 2px;
border:1px solid #91a4b8; color: white;
font-size:12px; font-size:12px;
border: 1px solid rgba(216, 38, 82, .5);
background-color:rgba(216, 38, 82, 0.25);
} }
QTableView::item:selected { QTableView::item:selected {
/* Table Item Selected */ /* Table Item Selected */
background-color:#91a4b8; margin: 4px 0;
color:#232834; color:rgb(41, 21, 21);
border: 1px solid rgba(216, 38, 82, .75);
background-color:rgba(216, 38, 82, 0.5);
} }
QMenuBar {
background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #343F4B, stop: 1 #232834); QTableView { outline:none; }
color: #91a4b8;
QTableView#balancesTable {
/* background-color: rgba(255, 255, 255, 0); */
} }
QMenuBar::item { QTableView#balancesTable::item {
background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #343F4B, stop: 1 #232834); /* background-color: rgba(255, 255, 255, 0); */
color: #91a4b8; border: 1px solid rgba(216, 38, 82, 0.25);
} }
QMenuBar::item:selected {
background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 0.25, stop: 0 #343F4B, stop: 1 #232834); QHeaderView::section {
border: 1px solid rgba(216, 38, 82, 0.5);
background-color: rgba(0, 0, 0, 0);
} }
QPushButton#startmining {
background-color: #343F4B; QHeaderView::section::first {
border-color: #91A4B8; border-top-left-radius: 10px;
padding: 10px; background-color: rgb(41, 21, 21);
} }
QPushButton#startmining:hover {
background-color: #232834; QHeaderView::section::middle {
background-color: rgb(41, 21, 21);
} }
QPushButton#startmining:pressed {
background-color: #232834; QHeaderView::section::last {
border: 1px solid rgba(216, 38, 82, 0.5);
border-top-right-radius: 10px;
background-color: rgb(41, 21, 21);
} }
QPushButton#startmining:disabled {
background-color: #232834; QHeaderView::section::vertical {
border: 0px solid rgba(0, 0, 0, 0);
background-color: rgba(0, 0, 0, 0);
} }
QPushButton#stopmining {
background-color: #343F4B;
border-color: #91A4B8;
padding: 10px;
margin-top: 7px;
QDialog#requestDialog {
min-width: 820;
min-height: 520;
} }
QPushButton#stopmining:hover {
background-color: #232834;
QDialog#requestDialog QLabel#label_8
{
min-height: 25;
padding-top: 7px;
} }
QPushButton#stopmining:pressed {
background-color: #232834; QDialog#requestDialog QLabel#label_7{
padding-left: 2px;
min-height: 25;
} }
QPushButton#stopmining:disabled { QDialog#requestDialog QLabel#label_5,
background-color: #232834; QDialog#requestDialog QLabel#label_6 {
min-height: 25;
padding-top: 2px;
} }
QComboBox#genproclimit{
font-size: 24px; QDialog#requestDialog QPushButton {
height: 40px; min-height: 32;
} }
QMenu::item:selected{ QDialog#requestDialog QPushButton#addContact {
background-color: #343F4B min-width: 150px;
} }

View File

@@ -105,7 +105,7 @@ QVariant BalancesTableModel::data(const QModelIndex &index, int role) const
QString theme_name = Settings::getInstance()->get_theme_name(); QString theme_name = Settings::getInstance()->get_theme_name();
QBrush b; QBrush b;
QColor color; QColor color;
if (theme_name == "Dark" || theme_name == "Midnight") { if (theme_name == "Dark" || theme_name == "Midnight" || theme_name == "dragonx") {
color = COLOR_WHITE; color = COLOR_WHITE;
}else{ }else{
color = COLOR_BLACK; color = COLOR_BLACK;

View File

@@ -97,7 +97,7 @@ void MainWindow::renderContactRequest(){
QString icon; QString icon;
auto theme = Settings::getInstance()->get_theme_name(); auto theme = Settings::getInstance()->get_theme_name();
if (theme == "Dark" || theme == "Midnight") { if (theme == "Dark" || theme == "Midnight" || theme == "dragonx") {
icon = ":/icons/res/unknownWhite.png"; icon = ":/icons/res/unknownWhite.png";
}else{ }else{
icon = ":/icons/res/unknownBlack.png"; icon = ":/icons/res/unknownBlack.png";
@@ -571,7 +571,7 @@ void MainWindow::sendChat() {
movie1->setFileName(":/img/res/loaderwhite.gif"); movie1->setFileName(":/img/res/loaderwhite.gif");
auto theme = Settings::getInstance()->get_theme_name(); auto theme = Settings::getInstance()->get_theme_name();
if (theme == "Dark" || theme == "Midnight") { if (theme == "Dark" || theme == "Midnight" || theme == "dragonx") {
connect(movie, &QMovie::frameChanged, [=]{ connect(movie, &QMovie::frameChanged, [=]{
ui->sendChatButton->setIcon(movie->currentPixmap()); ui->sendChatButton->setIcon(movie->currentPixmap());
@@ -603,7 +603,7 @@ void MainWindow::sendChat() {
QTimer::singleShot(1000, [=]() { QTimer::singleShot(1000, [=]() {
if (theme == "Dark" || theme == "Midnight") { if (theme == "Dark" || theme == "Midnight" || theme == "dragonx") {
QPixmap send(":/icons/res/send-white.png"); QPixmap send(":/icons/res/send-white.png");
QIcon sendIcon(send); QIcon sendIcon(send);
ui->sendChatButton->setIcon(sendIcon); ui->sendChatButton->setIcon(sendIcon);
@@ -640,7 +640,7 @@ void MainWindow::sendChat() {
movie->stop(); movie->stop();
if (theme == "Dark" || theme == "Midnight") { if (theme == "Dark" || theme == "Midnight" || theme == "dragonx") {
QPixmap send(":/icons/res/send-white.png"); QPixmap send(":/icons/res/send-white.png");
QIcon sendIcon(send); QIcon sendIcon(send);
ui->sendChatButton->setIcon(sendIcon); ui->sendChatButton->setIcon(sendIcon);
@@ -870,7 +870,7 @@ void MainWindow::ContactRequest() {
QMovie *movie1 = new QMovie(":/img/res/silentdragonxlite-animated-startup-dark.gif"); QMovie *movie1 = new QMovie(":/img/res/silentdragonxlite-animated-startup-dark.gif");
QMovie *movie2 = 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(); auto theme = Settings::getInstance()->get_theme_name();
if (theme == "Dark" || theme == "Midnight") { if (theme == "Dark" || theme == "Midnight" || theme == "dragonx") {
movie2->setScaledSize(QSize(512,512)); movie2->setScaledSize(QSize(512,512));
connD->topIcon->setMovie(movie2); connD->topIcon->setMovie(movie2);
movie2->start(); movie2->start();

View File

@@ -37,7 +37,7 @@ ConnectionLoader::ConnectionLoader(MainWindow* main, Controller* rpc)
//DEBUG("theme " << theme << " has loaded"); //DEBUG("theme " << theme << " has loaded");
auto size = QSize(512,512); 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");; QMovie *movie2 = new QMovie(":/img/res/silentdragonxlite-animated-startup-dark.gif");;
movie2->setScaledSize(size); movie2->setScaledSize(size);
qDebug() << "Animation dark loaded"; qDebug() << "Animation dark loaded";

View File

@@ -2032,7 +2032,7 @@ void Controller::shutdownhushd()
auto theme = Settings::getInstance()->get_theme_name(); auto theme = Settings::getInstance()->get_theme_name();
auto size = QSize(512,512); 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");; QMovie *movie2 = new QMovie(":/img/res/silentdragonxlite-animated-startup-dark.gif");;
movie2->setScaledSize(size); movie2->setScaledSize(size);
qDebug() << "Animation dark loaded"; qDebug() << "Animation dark loaded";

View File

@@ -28,12 +28,10 @@ void FilledIconLabel::resizeEvent(QResizeEvent*) {
color = COLOR_BLUE_BG; color = COLOR_BLUE_BG;
}else if(theme_name == "Light"){ }else if(theme_name == "Light"){
color = COLOR_LIGHT_BG; color = COLOR_LIGHT_BG;
}else if(theme_name == "Dark"){ }else if(theme_name == "Dark" || theme_name == "dragonx"){
color = COLOR_DARK_BG; color = COLOR_DARK_BG;
}else if(theme_name =="Midnight"){ }else if(theme_name =="Midnight"){
color = COLOR_MIDNIGHT_BG; color = COLOR_MIDNIGHT_BG;
}else if(theme_name =="dragonx"){
color = COLOR_DRAGONX_BG;
}else{ }else{
color = COLOR_DEFAULT_BG; color = COLOR_DEFAULT_BG;
} }

View File

@@ -36,7 +36,7 @@ void FirstTimeWizard::slot_change_theme(const QString& theme_name) {
} }
catch (...) catch (...)
{ {
saved_theme_name = "Dark"; saved_theme_name = "dragonx";
} }
QFile qFile(":/css/res/css/" + saved_theme_name +".css"); QFile qFile(":/css/res/css/" + saved_theme_name +".css");

View File

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

View File

@@ -864,7 +864,7 @@ void MainWindow::sendButton() {
QMovie *movie1 = new QMovie(":/img/res/silentdragonxlite-animated-startup-dark.gif");; QMovie *movie1 = new QMovie(":/img/res/silentdragonxlite-animated-startup-dark.gif");;
QMovie *movie2 = 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(); auto theme = Settings::getInstance()->get_theme_name();
if (theme == "Dark" || theme == "Midnight") { if (theme == "Dark" || theme == "Midnight" || theme == "dragonx") {
movie2->setScaledSize(QSize(512,512)); movie2->setScaledSize(QSize(512,512));
connD->topIcon->setMovie(movie2); connD->topIcon->setMovie(movie2);
movie2->start(); movie2->start();

View File

@@ -277,7 +277,7 @@ void Settings::set_currency_name(QString currency_name) {
QString Settings::get_theme_name() { QString Settings::get_theme_name() {
// Load from the QT Settings. // 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) { void Settings::set_theme_name(QString theme_name) {

View File

@@ -127,6 +127,11 @@
<verstretch>0</verstretch> <verstretch>0</verstretch>
</sizepolicy> </sizepolicy>
</property> </property>
<item>
<property name="text">
<string>dragonx</string>
</property>
</item>
<item> <item>
<property name="text"> <property name="text">
<string>Dark</string> <string>Dark</string>
@@ -152,6 +157,7 @@
<string>Default</string> <string>Default</string>
</property> </property>
</item> </item>
</widget> </widget>
<widget class="QCheckBox" name="chkFetchPrices"> <widget class="QCheckBox" name="chkFetchPrices">
<property name="geometry"> <property name="geometry">

View File

@@ -93,7 +93,7 @@ QVariant TxTableModel::data(const QModelIndex &index, int role) const {
QString theme_name = Settings::getInstance()->get_theme_name(); QString theme_name = Settings::getInstance()->get_theme_name();
QBrush b; QBrush b;
QColor color; QColor color;
if (theme_name == "Dark" || theme_name == "Midnight") { if (theme_name == "Dark" || theme_name == "Midnight" || theme_name == "dragonx") {
color = COLOR_WHITE; color = COLOR_WHITE;
}else{ }else{
color = COLOR_BLACK; color = COLOR_BLACK;