Fix misc image scaling hangs

This commit is contained in:
tobtoht 2020-10-13 15:45:52 +02:00
parent f029820a37
commit 363bf0ea38
6 changed files with 12 additions and 9 deletions

View file

@ -23,6 +23,7 @@
<file>assets/images/coldcard.png</file>
<file>assets/images/coldcard_unpaired.png</file>
<file>assets/images/confirmed.png</file>
<file>assets/images/confirmed_icon.png</file>
<file>assets/images/confirmed.svg</file>
<file>assets/images/connect.svg</file>
<file>assets/images/copy.png</file>
@ -30,10 +31,12 @@
<file>assets/images/edit.png</file>
<file>assets/images/exchange.png</file>
<file>assets/images/expired.png</file>
<file>assets/images/expired_icon.png</file>
<file>assets/images/eye1.png</file>
<file>assets/images/feather.png</file>
<file>assets/images/file.png</file>
<file>assets/images/ghost.png</file>
<file>assets/images/ghost_icon.png</file>
<file>assets/images/history.png</file>
<file>assets/images/info.png</file>
<file>assets/images/key.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

@ -8,8 +8,8 @@
NodeModel::NodeModel(unsigned int nodeSource, QObject *parent)
: QAbstractTableModel(parent)
, m_nodeSource(nodeSource)
, m_offline(QIcon(":/assets/images/expired.png"))
, m_online(QIcon(":/assets/images/confirmed.png"))
, m_offline(QIcon(":/assets/images/expired_icon.png"))
, m_online(QIcon(":/assets/images/confirmed_icon.png"))
{
}

View file

@ -334,15 +334,15 @@ int Utils::showMessageBox(const QString &windowTitle, const QString &body, bool
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
msgBox.setDefaultButton(QMessageBox::Ok);
QPixmap iconWarning = QPixmap(":/assets/images/ghost.png")
.scaled(QSize(48,48), Qt::KeepAspectRatio, Qt::SmoothTransformation);
if(warning) {
QPixmap iconWarning = QPixmap(":/assets/images/ghost_icon.png");
msgBox.setIconPixmap(iconWarning);
}
else {
QPixmap iconInfo = QPixmap(":/assets/images/info.png")
.scaled(QSize(48,48), Qt::KeepAspectRatio, Qt::SmoothTransformation);
if(warning)
msgBox.setIconPixmap(iconWarning);
else
msgBox.setIconPixmap(iconInfo);
}
return msgBox.exec();
}