/* * Strawberry Music Player * This file was part of Clementine. * Copyright 2010, David Sansome * Copyright 2013-2021, Jonas Kvinge * * Strawberry is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Strawberry is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Strawberry. If not, see . * */ #include "config.h" #include #include #include #include #include #include #include #include #include #include #include "about.h" #include "ui_about.h" using namespace Qt::Literals::StringLiterals; About::About(QWidget *parent) : QDialog(parent), ui_{} { ui_.setupUi(this); setWindowFlags(windowFlags()|Qt::WindowStaysOnTopHint); setWindowTitle(tr("About Strawberry")); QFont title_font; title_font.setBold(true); title_font.setPointSize(title_font.pointSize() + 4); ui_.label_title->setFont(title_font); ui_.label_title->setText(windowTitle()); ui_.label_text->setText(MainHtml()); ui_.buttonBox->button(QDialogButtonBox::Close)->setShortcut(QKeySequence::Close); } QString About::MainHtml() const { QString ret; ret += "

"_L1; ret += tr("Version %1").arg(QCoreApplication::applicationVersion()); ret += "

"_L1; ret += "

"_L1; ret += tr("Fork of %1.").arg(QStringLiteral("Clementine").arg(palette().text().color().name())); ret += "

"_L1; ret += "

"_L1; ret += tr("Source code: %1").arg(QStringLiteral("gitea.dryark.com/dryark/strawberry").arg(palette().text().color().name())); ret += "

"_L1; ret += "

"_L1; ret += tr("License: %1").arg(QStringLiteral("GPLv3").arg(palette().text().color().name())); ret += "

"_L1; return ret; }