Qt: Use svg instead of png

This commit is contained in:
Megamouse 2021-10-27 23:43:32 +02:00
parent 78bcb0fd53
commit 7f4b6b1ae7
16 changed files with 96 additions and 86 deletions

View file

@ -5,25 +5,28 @@
#include <QPushButton>
#include <QCheckBox>
#include <QSvgWidget>
welcome_dialog::welcome_dialog(QWidget* parent) : QDialog(parent), ui(new Ui::welcome_dialog)
welcome_dialog::welcome_dialog(std::shared_ptr<gui_settings> gui_settings, QWidget* parent)
: QDialog(parent)
, ui(new Ui::welcome_dialog)
, m_gui_settings(std::move(gui_settings))
{
ui->setupUi(this);
setWindowFlags(windowFlags() & Qt::WindowTitleHint);
gui_settings* settings = new gui_settings(this);
ui->okay->setEnabled(false);
ui->icon_label->load(QStringLiteral(":/rpcs3.svg"));
connect(ui->i_have_read, &QCheckBox::clicked, [=, this](bool checked)
connect(ui->i_have_read, &QCheckBox::clicked, [this](bool checked)
{
ui->okay->setEnabled(checked);
});
connect(ui->do_not_show, &QCheckBox::clicked, [=, this](bool checked)
connect(ui->do_not_show, &QCheckBox::clicked, [this](bool checked)
{
settings->SetValue(gui::ib_show_welcome, QVariant(!checked));
m_gui_settings->SetValue(gui::ib_show_welcome, QVariant(!checked));
});
connect(ui->okay, &QPushButton::clicked, this, &QDialog::accept);