Skip to content

Commit e33735b

Browse files
author
datyuesh
committed
Fix: Changed its name to Notes
Signed-off-by: datyuesh <[email protected]>
1 parent e8128e2 commit e33735b

File tree

6 files changed

+702
-650
lines changed

6 files changed

+702
-650
lines changed

src/plugins/ukui-notebook/about.cpp

+41-40
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ About::About(QWidget *parent) :
2424
ui->setupUi(this);
2525

2626
setWindowTitle(tr("About"));
27-
//setWindowFlags(Qt::FramelessWindowHint | Qt::Tool);
28-
//setAttribute(Qt::WA_TranslucentBackground);
27+
// setWindowFlags(Qt::FramelessWindowHint | Qt::Tool);
28+
// setAttribute(Qt::WA_TranslucentBackground);
2929
setAttribute(Qt::WA_DeleteOnClose);
3030

3131
// 添加窗管协议
@@ -35,8 +35,8 @@ About::About(QWidget *parent) :
3535
hints.decorations = MWM_DECOR_BORDER;
3636
XAtomHelper::getInstance()->setWindowMotifHint(this->winId(), hints);
3737

38-
ui->iconLabel->setPixmap(QIcon::fromTheme("kylin-notebook").pixmap(24,24));
39-
ui->titleLabel->setText(tr("Kylin Memo"));
38+
ui->iconLabel->setPixmap(QIcon::fromTheme("kylin-notebook").pixmap(24, 24));
39+
ui->titleLabel->setText(tr("Notes"));
4040
ui->closeBtn->setIcon(QIcon::fromTheme("window-close-symbolic"));
4141
ui->closeBtn->setProperty("isWindowButton", 0x2);
4242
ui->closeBtn->setProperty("useIconHighlightEffect", 0x8);
@@ -47,13 +47,13 @@ About::About(QWidget *parent) :
4747
});
4848

4949
ui->versionLabel->setText(tr("Version: 2020.1.0"));
50-
// ui->teamLabel->setText(tr("Service & Support: ") +
51-
// "<a href=\"mailto://[email protected]\""
52-
// "style=\"color: palette(buttonText)\">"
53-
54-
ui->appiconLabel->setPixmap(QIcon::fromTheme("kylin-notebook").pixmap(96,96));
55-
ui->appnameLabel->setText(tr("Kylin Memo"));
56-
ui->introduceLabel->setText(tr("Kylin Memo is a self-developed sidebar application plug-in, "
50+
// ui->teamLabel->setText(tr("Service & Support: ") +
51+
// "<a href=\"mailto://[email protected]\""
52+
// "style=\"color: palette(buttonText)\">"
53+
54+
ui->appiconLabel->setPixmap(QIcon::fromTheme("kylin-notebook").pixmap(96, 96));
55+
ui->appnameLabel->setText(tr("Notes"));
56+
ui->introduceLabel->setText(tr("Notes is a self-developed sidebar application plug-in, "
5757
"which provides a rich interface, convenient operation and stable functions, "
5858
"aiming at a friendly user experience."));
5959
ui->introduceLabel->setAlignment(Qt::AlignJustify);
@@ -71,62 +71,63 @@ About::~About()
7171
delete ui;
7272
}
7373

74-
void About::paintEvent(QPaintEvent *event) {
74+
void About::paintEvent(QPaintEvent *event)
75+
{
7576
Q_UNUSED(event);
7677
QPainter p(this);
7778
p.setRenderHint(QPainter::Antialiasing); // 反锯齿;
7879
QPainterPath rectPath;
7980
rectPath.addRect(this->rect());
80-
p.fillPath(rectPath,palette().color(QPalette::Base));
81+
p.fillPath(rectPath, palette().color(QPalette::Base));
8182
}
8283

8384
void About::listenToGsettings()
8485
{
8586
const QByteArray styleID(UKUI_STYLE_SCHEMA);
8687
QStringList stylelist;
8788

88-
if (QGSettings::isSchemaInstalled(styleID)){
89+
if (QGSettings::isSchemaInstalled(styleID)) {
8990
QGSettings *styleUKUI = new QGSettings(styleID);
9091

91-
stylelist << STYLE_NAME_KEY_DARK << STYLE_NAME_KEY_BLACK; //<<STYLE_NAME_KEY_DEFAULT;
92-
93-
if(stylelist.contains(styleUKUI->get(STYLE_NAME).toString())){
94-
ui->teamLabel->setText(tr("Service & Support: ") +
95-
"<a href=\"mailto://[email protected]\""
96-
"style=\"color:white\">"
97-
98-
}else{
99-
ui->teamLabel->setText(tr("Service & Support: ") +
100-
"<a href=\"mailto://[email protected]\""
101-
"style=\"color:black\">"
102-
92+
stylelist << STYLE_NAME_KEY_DARK << STYLE_NAME_KEY_BLACK; // <<STYLE_NAME_KEY_DEFAULT;
93+
94+
if (stylelist.contains(styleUKUI->get(STYLE_NAME).toString())) {
95+
ui->teamLabel->setText(tr("Service & Support: ")
96+
+"<a href=\"mailto://[email protected]\""
97+
"style=\"color:white\">"
98+
99+
} else {
100+
ui->teamLabel->setText(tr("Service & Support: ")
101+
+"<a href=\"mailto://[email protected]\""
102+
"style=\"color:black\">"
103+
103104
}
104105

105-
connect(styleUKUI, &QGSettings::changed, this, [=] (const QString &key){
106-
if(key==STYLE_NAME){
107-
if(stylelist.contains(styleUKUI->get(STYLE_NAME).toString())){
108-
ui->teamLabel->setText(tr("Service & Support: ") +
109-
"<a href=\"mailto://[email protected]\""
110-
"style=\"color:white\">"
111-
112-
}else{
113-
ui->teamLabel->setText(tr("Service & Support: ") +
114-
"<a href=\"mailto://[email protected]\""
115-
"style=\"color:black\">"
116-
106+
connect(styleUKUI, &QGSettings::changed, this, [=](const QString &key){
107+
if (key == STYLE_NAME) {
108+
if (stylelist.contains(styleUKUI->get(STYLE_NAME).toString())) {
109+
ui->teamLabel->setText(tr("Service & Support: ")
110+
+"<a href=\"mailto://[email protected]\""
111+
"style=\"color:white\">"
112+
113+
} else {
114+
ui->teamLabel->setText(tr("Service & Support: ")
115+
+"<a href=\"mailto://[email protected]\""
116+
"style=\"color:black\">"
117+
117118
}
118119
}
119120
});
120121

121-
if(styleUKUI->get(SYSTEM_FONT_EKY).toInt()){
122+
if (styleUKUI->get(SYSTEM_FONT_EKY).toInt()) {
122123
const int size = styleUKUI->get(SYSTEM_FONT_EKY).toInt();
123124
QFont dateFont;
124125
dateFont.setPointSize(size * 1.3);
125126
ui->appnameLabel->setFont(dateFont);
126127
}
127128

128129
connect(styleUKUI, &QGSettings::changed, this, [=](const QString &key){
129-
if(key == "systemFontSize"){
130+
if (key == "systemFontSize") {
130131
const int size = styleUKUI->get(SYSTEM_FONT_EKY).toInt();
131132
QFont dateFont;
132133
dateFont.setPointSize(size * 1.3);

0 commit comments

Comments
 (0)