diff --git a/resources.qrc b/resources.qrc index 093436f..273fc0b 100644 --- a/resources.qrc +++ b/resources.qrc @@ -65,5 +65,6 @@ DeveloperDiskImages.json resources/keychain.mp4 resources/wireless-gallery-import.mp4 + resources/trust.png \ No newline at end of file diff --git a/resources/trust.png b/resources/trust.png new file mode 100755 index 0000000..819a50c Binary files /dev/null and b/resources/trust.png differ diff --git a/src/devicependingwidget.cpp b/src/devicependingwidget.cpp index 55b582b..9b41114 100644 --- a/src/devicependingwidget.cpp +++ b/src/devicependingwidget.cpp @@ -18,22 +18,32 @@ */ #include "devicependingwidget.h" +#include "responsiveqlabel.h" #include #include DevicePendingWidget::DevicePendingWidget(bool locked, QWidget *parent) - : QWidget{parent}, m_label{nullptr}, m_locked{locked} + : QWidget{parent}, m_label{nullptr}, m_imageLabel{nullptr}, m_locked{locked} { QVBoxLayout *layout = new QVBoxLayout(this); layout->setContentsMargins(0, 0, 0, 0); layout->setSpacing(5); - + layout->addStretch(); m_label = new QLabel( m_locked ? "Please unlock the screen and click on trust on the popup" : "Please click on trust on the popup", this); m_label->setWordWrap(true); - layout->addWidget(m_label, 0, Qt::AlignCenter); + m_label->setAlignment(Qt::AlignCenter); + layout->addWidget(m_label); + + m_imageLabel = new ResponsiveQLabel(this); + m_imageLabel->setPixmap(QPixmap(":/resources/trust.png")); + m_imageLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); + m_imageLabel->setMinimumSize(400, 200); + m_imageLabel->setScaledContents(true); + layout->addWidget(m_imageLabel, 1, Qt::AlignHCenter); + layout->addStretch(); setLayout(layout); } diff --git a/src/devicependingwidget.h b/src/devicependingwidget.h index 1ed5bdd..06d5e46 100644 --- a/src/devicependingwidget.h +++ b/src/devicependingwidget.h @@ -23,6 +23,8 @@ #include #include +class ResponsiveQLabel; + class DevicePendingWidget : public QWidget { Q_OBJECT @@ -32,6 +34,7 @@ public: signals: private: QLabel *m_label; + ResponsiveQLabel *m_imageLabel; bool m_locked; };