-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathfeedback.cc
More file actions
62 lines (55 loc) · 2.19 KB
/
Copy pathfeedback.cc
File metadata and controls
62 lines (55 loc) · 2.19 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include "feedback.h"
#include <QHBoxLayout>
#include <QLabel>
#include <QVBoxLayout>
static QWidget *createRow(QLabel *label, QLabel *value)
{
QWidget *row = new QWidget;
QHBoxLayout *layout = new QHBoxLayout(row);
layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(12);
layout->addWidget(label);
layout->addStretch();
layout->addWidget(value);
return row;
}
Feedback::Feedback(QWidget *parent)
: FramelessDialog("Feedback", parent)
{
resize(420, 260);
setMinimumSize(380, 220);
QLabel *subtitle = new QLabel("Have questions or feedback? Reach out to us through any of these channels.", this);
subtitle->setObjectName("dialogSubtitle");
subtitle->setWordWrap(true);
QLabel *qqLabel = new QLabel("QQ Group", this);
qqLabel->setObjectName("feedbackLabel");
QLabel *qqValue = new QLabel("768305206", this);
qqValue->setObjectName("feedbackValue");
qqValue->setTextInteractionFlags(Qt::TextSelectableByMouse);
QWidget *qqRow = createRow(qqLabel, qqValue);
QLabel *telegramLabel = new QLabel("Telegram", this);
telegramLabel->setObjectName("feedbackLabel");
QLabel *telegramValue = new QLabel(
"<a href=\"https://t.me/CandyUserGroup\" style=\"color: #4a90d9; text-decoration: none;\">Join Group</a>", this);
telegramValue->setObjectName("feedbackValue");
telegramValue->setOpenExternalLinks(true);
QWidget *telegramRow = createRow(telegramLabel, telegramValue);
QLabel *githubLabel = new QLabel("GitHub", this);
githubLabel->setObjectName("feedbackLabel");
QLabel *githubValue = new QLabel(
"<a href=\"https://github.com/lanthora/cake/issues/new\" style=\"color: #4a90d9; text-decoration: none;\">Create "
"Issue</a>",
this);
githubValue->setObjectName("feedbackValue");
githubValue->setOpenExternalLinks(true);
QWidget *githubRow = createRow(githubLabel, githubValue);
QVBoxLayout *layout = contentLayout();
layout->setContentsMargins(32, 24, 32, 24);
layout->setSpacing(8);
layout->addWidget(subtitle);
layout->addSpacing(8);
layout->addWidget(qqRow);
layout->addWidget(telegramRow);
layout->addWidget(githubRow);
layout->addStretch();
}