Skip to content

Commit 89e07c0

Browse files
committed
0.2
1 parent 95488fa commit 89e07c0

File tree

7 files changed

+16
-17
lines changed

7 files changed

+16
-17
lines changed

LICENSE

100644100755
File mode changed.

README.md

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# plainAbout
22

33
About plainDE window. <br><br>
4-
<img src="about-scr-0.1.4.png" width=400 height=266>
4+
<img src="scr_about.png" width=400 height=266>

about.cpp

100644100755
Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "ui_about.h"
99

1010
QJsonObject config;
11-
QString version = "0.1.4";
11+
QString releaseData;
1212

1313

1414
void readConfig() {
@@ -23,40 +23,39 @@ void readConfig() {
2323
config = QJsonDocument::fromJson(data.toUtf8()).object();
2424
}
2525

26-
about::about(QWidget *parent)
27-
: QWidget(parent)
28-
, ui(new Ui::about)
29-
{
26+
void readReleaseData() {
27+
QFile releaseFile;
28+
releaseFile.setFileName("/usr/share/plainDE/release_data");
29+
releaseFile.open(QIODevice::ReadOnly | QIODevice::Text);
30+
releaseData = releaseFile.readAll();
31+
releaseFile.close();
32+
}
33+
34+
about::about(QWidget *parent) : QWidget(parent), ui(new Ui::about) {
3035
ui->setupUi(this);
3136

32-
this->setWindowTitle("About plainDE");
37+
readConfig();
38+
readReleaseData();
3339

40+
this->setWindowTitle("About plainDE");
3441
QStringList args = QCoreApplication::arguments();
3542
if (args.contains("--plainPanel")) {
3643
ui->appNameLabel->setText("plainPanel");
3744
}
3845
else if (args.contains("--plainControlCenter")) {
3946
ui->appNameLabel->setText("plainControlCenter");
4047
}
41-
42-
ui->versionLabel->setText(version);
43-
48+
ui->versionLabel->setText(releaseData);
4449
ui->logoLabel->setPixmap(QPixmap("/usr/share/plainDE/menuIcon.png"));
4550

46-
readConfig();
47-
4851
QString stylesheetPath = "/usr/share/plainDE/styles/" + config["theme"].toString();
49-
5052
QFile stylesheetReader(stylesheetPath);
5153
stylesheetReader.open(QIODevice::ReadOnly | QIODevice::Text);
5254
QTextStream styleSheet(&stylesheetReader);
5355
this->setStyleSheet(styleSheet.readAll());
54-
55-
5656
}
5757

58-
about::~about()
59-
{
58+
about::~about() {
6059
delete ui;
6160
}
6261

about.h

100644100755
File mode changed.

about.ui

100644100755
File mode changed.

main.cpp

100644100755
File mode changed.

plainAbout.pro

100644100755
File mode changed.

0 commit comments

Comments
 (0)