Browse Source
Merge pull request #110 from csharpee/animations
Animations Added to SDL
russian
Denio
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with
166 additions and
148 deletions
-
application.qrc
-
BIN
res/silentdragonlite-animated-dark.gif
-
BIN
res/silentdragonlite-animated-startup-dark.gif
-
BIN
res/silentdragonlite-animated-startup.gif
-
BIN
res/silentdragonlite-animated.gif
-
src/connection.cpp
-
src/connection.ui
-
src/controller.cpp
-
src/sendtab.cpp
|
|
@ -12,6 +12,10 @@ |
|
|
|
<qresource prefix="/img"> |
|
|
|
<file>res/hushdlogo.gif</file> |
|
|
|
<file>res/logobig.gif</file> |
|
|
|
<file>res/silentdragonlite-animated.gif</file> |
|
|
|
<file>res/silentdragonlite-animated-dark.gif</file> |
|
|
|
<file>res/silentdragonlite-animated-startup.gif</file> |
|
|
|
<file>res/silentdragonlite-animated-startup-dark.gif</file> |
|
|
|
</qresource> |
|
|
|
<qresource prefix="/translations"> |
|
|
|
<file>res/silentdragonlite_de.qm</file> |
|
|
|
Width:
|
Height:
|
Size: 406 KiB
|
Width:
|
Height:
|
Size: 1.0 MiB
|
Width:
|
Height:
|
Size: 1015 KiB
|
Width:
|
Height:
|
Size: 406 KiB
|
|
|
@ -14,18 +14,30 @@ ConnectionLoader::ConnectionLoader(MainWindow* main, Controller* rpc) |
|
|
|
{ |
|
|
|
this->main = main; |
|
|
|
this->rpc = rpc; |
|
|
|
|
|
|
|
d = new QDialog(main); |
|
|
|
connD = new Ui_ConnectionDialog(); |
|
|
|
connD->setupUi(d); |
|
|
|
QPixmap logo(":/img/res/logobig.gif"); |
|
|
|
connD->topIcon->setBasePixmap( |
|
|
|
logo.scaled( |
|
|
|
256, |
|
|
|
256, |
|
|
|
Qt::KeepAspectRatio, |
|
|
|
Qt::SmoothTransformation |
|
|
|
) |
|
|
|
); |
|
|
|
|
|
|
|
auto theme = Settings::getInstance()->get_theme_name(); |
|
|
|
qDebug() << theme << "theme has loaded"; |
|
|
|
auto size = QSize(512,512); |
|
|
|
|
|
|
|
if (theme == "dark" || theme == "midnight") { |
|
|
|
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>(); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -9,8 +9,8 @@ |
|
|
|
<rect> |
|
|
|
<x>0</x> |
|
|
|
<y>0</y> |
|
|
|
<width>513</width> |
|
|
|
<height>201</height> |
|
|
|
<width>512</width> |
|
|
|
<height>513</height> |
|
|
|
</rect> |
|
|
|
</property> |
|
|
|
<property name="windowTitle"> |
|
|
@ -33,7 +33,7 @@ |
|
|
|
<number>0</number> |
|
|
|
</property> |
|
|
|
<item> |
|
|
|
<widget class="FilledIconLabel" name="topIcon"> |
|
|
|
<widget class="QLabel" name="topIcon"> |
|
|
|
<property name="sizePolicy"> |
|
|
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding"> |
|
|
|
<horstretch>0</horstretch> |
|
|
@ -55,7 +55,7 @@ |
|
|
|
<item> |
|
|
|
<widget class="QLabel" name="status"> |
|
|
|
<property name="text"> |
|
|
|
<string>Starting Up</string> |
|
|
|
<string>The Dragon Awakens...</string> |
|
|
|
</property> |
|
|
|
<property name="alignment"> |
|
|
|
<set>Qt::AlignCenter</set> |
|
|
@ -84,13 +84,6 @@ |
|
|
|
</item> |
|
|
|
</layout> |
|
|
|
</widget> |
|
|
|
<customwidgets> |
|
|
|
<customwidget> |
|
|
|
<class>FilledIconLabel</class> |
|
|
|
<extends>QLabel</extends> |
|
|
|
<header>fillediconlabel.h</header> |
|
|
|
</customwidget> |
|
|
|
</customwidgets> |
|
|
|
<resources/> |
|
|
|
<connections/> |
|
|
|
</ui> |
|
|
|
|
|
@ -1523,7 +1523,7 @@ void Controller::shutdownhushd() |
|
|
|
QDialog d(main); |
|
|
|
Ui_ConnectionDialog connD; |
|
|
|
connD.setupUi(&d); |
|
|
|
connD.topIcon->setBasePixmap(QIcon(":/icons/res/icon.ico").pixmap(256, 256)); |
|
|
|
connD.topIcon->setPixmap(QIcon(":/icons/res/icon.ico").pixmap(256, 256)); |
|
|
|
connD.status->setText(QObject::tr("Please wait for SilentDragonLite to exit")); |
|
|
|
connD.statusDetail->setText(QObject::tr("Waiting for hushd to exit")); |
|
|
|
bool finished = false; |
|
|
|
|
|
@ -843,8 +843,18 @@ void MainWindow::sendButton() { |
|
|
|
auto d = new QDialog(this); |
|
|
|
auto connD = new Ui_ConnectionDialog(); |
|
|
|
connD->setupUi(d); |
|
|
|
QPixmap logo(":/img/res/logobig.gif"); |
|
|
|
connD->topIcon->setBasePixmap(logo.scaled(256, 256, Qt::KeepAspectRatio, Qt::SmoothTransformation)); |
|
|
|
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") { |
|
|
|
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->statusDetail->setText(tr("Computing your transaction")); |
|
|
@ -937,4 +947,3 @@ QString MainWindow::doSendTxValidations(Tx tx) { |
|
|
|
void MainWindow::cancelButton() { |
|
|
|
clearSendForm(); |
|
|
|
} |
|
|
|
|
|
|
|