-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathabout.cc
More file actions
39 lines (34 loc) · 1.23 KB
/
Copy pathabout.cc
File metadata and controls
39 lines (34 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#include "about.h"
#include "define.h"
#include <QLabel>
#include <QVBoxLayout>
About::About(QWidget *parent)
: FramelessDialog("About", parent)
{
resize(400, 220);
setMinimumSize(360, 200);
QLabel *title = new QLabel("Cake", this);
title->setObjectName("aboutTitle");
title->setAlignment(Qt::AlignCenter);
QLabel *version = new QLabel("Version " CAKE_VERSION, this);
version->setObjectName("aboutVersion");
version->setAlignment(Qt::AlignCenter);
QLabel *desc = new QLabel(
"<a href=\"https://github.com/lanthora/cake\" style=\"color: #4a90d9; text-decoration: none;\">Cake</a> "
"is a desktop application<br>built with Qt based on "
"<a href=\"https://github.com/lanthora/candy\" style=\"color: #4a90d9; text-decoration: none;\">Candy</a>",
this);
desc->setObjectName("aboutDesc");
desc->setAlignment(Qt::AlignCenter);
desc->setOpenExternalLinks(true);
desc->setWordWrap(true);
QVBoxLayout *layout = contentLayout();
layout->setContentsMargins(32, 24, 32, 24);
layout->setSpacing(4);
layout->addStretch();
layout->addWidget(title);
layout->addWidget(version);
layout->addSpacing(16);
layout->addWidget(desc);
layout->addStretch();
}