4 AboutView::AboutView(QWidget *parent) : QWidget(parent) {
6 QBoxLayout *aboutlayout = new QHBoxLayout(this);
7 aboutlayout->setAlignment(Qt::AlignCenter);
8 aboutlayout->setMargin(30);
9 aboutlayout->setSpacing(30);
11 QLabel *logo = new QLabel(this);
12 logo->setPixmap(QPixmap(":/images/app.png"));
13 aboutlayout->addWidget(logo, 0, Qt::AlignTop);
15 QBoxLayout *layout = new QVBoxLayout();
16 layout->setAlignment(Qt::AlignCenter);
17 layout->setSpacing(30);
18 aboutlayout->addLayout(layout);
20 QString info = "<html><style>a { color: palette(text); text-decoration: none; font-weight: bold }</style><body><h1>" + QString(Constants::APP_NAME) + "</h1>"
21 "<p>" + tr("There's life outside the browser!") + "</p>"
22 "<p>" + tr("Version %1").arg(Constants::VERSION) + "</p>"
23 + QString("<p><a href=\"%1/\">%1</a></p>").arg(Constants::WEBSITE) +
24 #if !defined(APP_MAC) && !defined(APP_WIN)
25 "<p>" + tr("%1 is Free Software but its development takes precious time.").arg(Constants::APP_NAME) + "<br/>"
26 + tr("Please <a href='%1'>donate</a> to support the continued development of %2.")
27 .arg(QString(Constants::WEBSITE).append("#donate"), Constants::APP_NAME) + "</p>"
29 "<p>" + tr("Report bugs and send in your ideas to %1")
30 .arg(QString("<a href=\"mailto:%1\">%1</a>").arg(Constants::EMAIL)) + "</p>"
33 + tr("Icon designed by %1.").arg("<a href='http://www.kolorguild.com/'>David Nel</a>")
34 + "<br>" + tr("Compact mode contributed by %1.").arg("Stefan Brück")
35 + "<br>" + tr("HTTP proxy support contributed by %1.").arg("Kiwamu Okabe")
38 "<p>" + tr("Translated by the cool people at %1")
39 .arg("<a href='http://www.transifex.net/projects/p/minitube/resource/main/'>Transifex</a>")
42 #if !defined(APP_MAC) && !defined(APP_WIN)
43 "<p>" + tr("Released under the <a href='%1'>GNU General Public License</a>")
44 .arg("http://www.gnu.org/licenses/gpl.html") + "</p>"
46 "<p>© 2009-2011 " + Constants::ORG_NAME + "</p>"
48 QLabel *infoLabel = new QLabel(info, this);
49 infoLabel->setOpenExternalLinks(true);
50 infoLabel->setWordWrap(true);
51 layout->addWidget(infoLabel);
53 QLayout *buttonLayout = new QHBoxLayout();
54 buttonLayout->setAlignment(Qt::AlignLeft);
55 QPushButton *closeButton = new QPushButton(tr("&Close"), this);
56 closeButton->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum);
58 closeButton->setDefault(true);
59 closeButton->setFocus(Qt::OtherFocusReason);
60 connect(closeButton, SIGNAL(clicked()), parent, SLOT(goBack()));
61 buttonLayout->addWidget(closeButton);
63 layout->addLayout(buttonLayout);
67 void AboutView::paintEvent(QPaintEvent * /*event*/) {
68 #if defined(APP_MAC) | defined(APP_WIN)
70 if (window()->isActiveWindow()) {
71 brush = QBrush(QColor(0xdd, 0xe4, 0xeb));
73 brush = palette().window();
75 QPainter painter(this);
76 painter.fillRect(0, 0, width(), height(), brush);