@@ -24,8 +24,8 @@ About::About(QWidget *parent) :
24
24
ui->setupUi (this );
25
25
26
26
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);
29
29
setAttribute (Qt::WA_DeleteOnClose);
30
30
31
31
// 添加窗管协议
@@ -35,8 +35,8 @@ About::About(QWidget *parent) :
35
35
hints.decorations = MWM_DECOR_BORDER;
36
36
XAtomHelper::getInstance ()->setWindowMotifHint (this ->winId (), hints);
37
37
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 " ));
40
40
ui->closeBtn ->setIcon (QIcon::fromTheme (" window-close-symbolic" ));
41
41
ui->closeBtn ->setProperty (" isWindowButton" , 0x2 );
42
42
ui->closeBtn ->setProperty (" useIconHighlightEffect" , 0x8 );
@@ -47,13 +47,13 @@ About::About(QWidget *parent) :
47
47
});
48
48
49
49
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, "
57
57
" which provides a rich interface, convenient operation and stable functions, "
58
58
" aiming at a friendly user experience." ));
59
59
ui->introduceLabel ->setAlignment (Qt::AlignJustify);
@@ -71,62 +71,63 @@ About::~About()
71
71
delete ui;
72
72
}
73
73
74
- void About::paintEvent (QPaintEvent *event) {
74
+ void About::paintEvent (QPaintEvent *event)
75
+ {
75
76
Q_UNUSED (event);
76
77
QPainter p (this );
77
78
p.setRenderHint (QPainter::Antialiasing); // 反锯齿;
78
79
QPainterPath rectPath;
79
80
rectPath.addRect (this ->rect ());
80
- p.fillPath (rectPath,palette ().color (QPalette::Base));
81
+ p.fillPath (rectPath, palette ().color (QPalette::Base));
81
82
}
82
83
83
84
void About::listenToGsettings ()
84
85
{
85
86
const QByteArray styleID (UKUI_STYLE_SCHEMA);
86
87
QStringList stylelist;
87
88
88
- if (QGSettings::isSchemaInstalled (styleID)){
89
+ if (QGSettings::isSchemaInstalled (styleID)) {
89
90
QGSettings *styleUKUI = new QGSettings (styleID);
90
91
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
+
103
104
}
104
105
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
+
117
118
}
118
119
}
119
120
});
120
121
121
- if (styleUKUI->get (SYSTEM_FONT_EKY).toInt ()){
122
+ if (styleUKUI->get (SYSTEM_FONT_EKY).toInt ()) {
122
123
const int size = styleUKUI->get (SYSTEM_FONT_EKY).toInt ();
123
124
QFont dateFont;
124
125
dateFont.setPointSize (size * 1.3 );
125
126
ui->appnameLabel ->setFont (dateFont);
126
127
}
127
128
128
129
connect (styleUKUI, &QGSettings::changed, this , [=](const QString &key){
129
- if (key == " systemFontSize" ){
130
+ if (key == " systemFontSize" ) {
130
131
const int size = styleUKUI->get (SYSTEM_FONT_EKY).toInt ();
131
132
QFont dateFont;
132
133
dateFont.setPointSize (size * 1.3 );
0 commit comments