added bool oper. for new theme, plus new animations
This commit is contained in:
@@ -14,18 +14,30 @@ ConnectionLoader::ConnectionLoader(MainWindow* main, Controller* rpc)
|
|||||||
{
|
{
|
||||||
this->main = main;
|
this->main = main;
|
||||||
this->rpc = rpc;
|
this->rpc = rpc;
|
||||||
|
|
||||||
d = new QDialog(main);
|
d = new QDialog(main);
|
||||||
connD = new Ui_ConnectionDialog();
|
connD = new Ui_ConnectionDialog();
|
||||||
connD->setupUi(d);
|
connD->setupUi(d);
|
||||||
QPixmap logo(":/img/res/logobig.gif");
|
|
||||||
connD->topIcon->setBasePixmap(
|
auto theme = Settings::getInstance()->get_theme_name();
|
||||||
logo.scaled(
|
qDebug() << theme << "theme has loaded";
|
||||||
256,
|
auto size = QSize(512,512);
|
||||||
256,
|
|
||||||
Qt::KeepAspectRatio,
|
if (theme == "dark" || theme == "midnight") {
|
||||||
Qt::SmoothTransformation
|
QMovie *movie2 = new QMovie(":/img/res/silentdragonlite-animated-startup-dark.gif");;
|
||||||
)
|
movie2->setScaledSize(size);
|
||||||
);
|
qDebug() << "Animation dark loaded";
|
||||||
|
connD->topIcon->setMovie(movie2);
|
||||||
|
movie2->start();
|
||||||
|
} else {
|
||||||
|
QMovie *movie1 = new QMovie(":/img/res/silentdragonlite-animated-startup.gif");;
|
||||||
|
movie1->setScaledSize(size);
|
||||||
|
qDebug() << "Animation light loaded";
|
||||||
|
connD->topIcon->setMovie(movie1);
|
||||||
|
movie1->start();
|
||||||
|
}
|
||||||
|
main->logger->write("Set animation");
|
||||||
|
qDebug() << "Set animation";
|
||||||
isSyncing = new QAtomicInteger<bool>();
|
isSyncing = new QAtomicInteger<bool>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -843,8 +843,18 @@ void MainWindow::sendButton() {
|
|||||||
auto d = new QDialog(this);
|
auto d = new QDialog(this);
|
||||||
auto connD = new Ui_ConnectionDialog();
|
auto connD = new Ui_ConnectionDialog();
|
||||||
connD->setupUi(d);
|
connD->setupUi(d);
|
||||||
QPixmap logo(":/img/res/logobig.gif");
|
QMovie *movie1 = new QMovie(":/img/res/silentdragonlite-animated.gif");;
|
||||||
connD->topIcon->setBasePixmap(logo.scaled(256, 256, Qt::KeepAspectRatio, Qt::SmoothTransformation));
|
QMovie *movie2 = new QMovie(":/img/res/silentdragonlite-animated-dark.gif");;
|
||||||
|
auto theme = Settings::getInstance()->get_theme_name();
|
||||||
|
if (theme == "dark" || theme == "midnight") {
|
||||||
|
movie2->setScaledSize(QSize(512,512));
|
||||||
|
connD->topIcon->setMovie(movie2);
|
||||||
|
movie2->start();
|
||||||
|
} else {
|
||||||
|
movie1->setScaledSize(QSize(512,512));
|
||||||
|
connD->topIcon->setMovie(movie1);
|
||||||
|
movie1->start();
|
||||||
|
}
|
||||||
|
|
||||||
connD->status->setText(tr("Please wait..."));
|
connD->status->setText(tr("Please wait..."));
|
||||||
connD->statusDetail->setText(tr("Computing your transaction"));
|
connD->statusDetail->setText(tr("Computing your transaction"));
|
||||||
@@ -937,4 +947,3 @@ QString MainWindow::doSendTxValidations(Tx tx) {
|
|||||||
void MainWindow::cancelButton() {
|
void MainWindow::cancelButton() {
|
||||||
clearSendForm();
|
clearSendForm();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user