#include "aboutdialog.h" #include "./ui_aboutdialog.h" #include #include #include static constexpr auto about = R"(

FontEdit v##version## build ##build##

Copyright ##year## Dominik Kapusta
https://kapusta.cc@ayoy


Get the Source CodeReport a Bug

This program is distributed under the terms of General Public License v3.

Icons from www.flaticon.com made by:
SmashiconsFreepikPixel perfect

)"; AboutDialog::AboutDialog(QWidget *parent) : QDialog(parent), ui(new Ui::AboutDialog) { ui->setupUi(this); QIcon icon(":/icon/assets/icon/fontedit96.png"); ui->iconLabel->setPixmap(icon.pixmap(ui->iconLabel->size())); auto text = QString::fromStdString({about}); text.replace("##version##", QApplication::applicationVersion()); text.replace("##build##", BUILD); text.replace("##year##", YEAR); connect(ui->htmlLabel, &QLabel::linkActivated, [&](const QString& link) { QDesktopServices::openUrl(QUrl(link)); }); ui->htmlLabel->setText(text); } AboutDialog::~AboutDialog() { delete ui; }