diff --git a/include/f1x/openauto/autoapp/UI/MainWindow.hpp b/include/f1x/openauto/autoapp/UI/MainWindow.hpp
index 7b80d8d..d45ee4f 100644
--- a/include/f1x/openauto/autoapp/UI/MainWindow.hpp
+++ b/include/f1x/openauto/autoapp/UI/MainWindow.hpp
@@ -221,6 +221,8 @@ private:
bool hotspotActive = false;
int currentPlaylistIndex = 0;
+
+ bool background_set = false;
};
}
diff --git a/src/autoapp/UI/MainWindow.cpp b/src/autoapp/UI/MainWindow.cpp
index cb16047..0639cb6 100644
--- a/src/autoapp/UI/MainWindow.cpp
+++ b/src/autoapp/UI/MainWindow.cpp
@@ -180,33 +180,33 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi
// Build Version string for mainscreen
// Get git version string
- QFileInfo vFile("/etc/crankshaft.build");
- if (vFile.exists()) {
- QFile versionFile(QString("/etc/crankshaft.build"));
- versionFile.open(QIODevice::ReadOnly);
- QTextStream data_version(&versionFile);
- QString lineversion = data_version.readAll();
- versionFile.close();
- this->bversion=lineversion.simplified();
- } else {
- this->bversion="unknown";
- }
+ //QFileInfo vFile("/etc/crankshaft.build");
+ //if (vFile.exists()) {
+ // QFile versionFile(QString("/etc/crankshaft.build"));
+ // versionFile.open(QIODevice::ReadOnly);
+ // QTextStream data_version(&versionFile);
+ // QString lineversion = data_version.readAll();
+ // versionFile.close();
+ // this->bversion=lineversion.simplified();
+ //} else {
+ // this->bversion="unknown";
+ //}
// Get date string
- QFileInfo dFile("/etc/crankshaft.build");
- if (dFile.exists()) {
- QFile dateFile(QString("/etc/crankshaft.date"));
- dateFile.open(QIODevice::ReadOnly);
- QTextStream data_date(&dateFile);
- QString linedate = data_date.readAll();
- dateFile.close();
- this->bdate=linedate.simplified();
- } else {
- this->bdate="- - -";
- }
+ //QFileInfo dFile("/etc/crankshaft.build");
+ //if (dFile.exists()) {
+ // QFile dateFile(QString("/etc/crankshaft.date"));
+ // dateFile.open(QIODevice::ReadOnly);
+ // QTextStream data_date(&dateFile);
+ // QString linedate = data_date.readAll();
+ // dateFile.close();
+ // this->bdate=linedate.simplified();
+ //} else {
+ // this->bdate="- - -";
+ //}
- QString buildid = "Build: " + this->bversion + " (" + this->bdate + ")";
- ui_->BuildID->setText(buildid);
+ //QString buildid = "Build: " + this->bversion + " (" + this->bdate + ")";
+ //ui_->BuildID->setText(buildid);
// enable connects while cam is enabled
if (this->cameraButtonForce) {
@@ -1026,36 +1026,40 @@ void f1x::openauto::autoapp::ui::MainWindow::showTime()
if (ui_->centralWidget->isVisible() == true) {
ui_->centralWidget->hide();
this->setStyleSheet("QMainWindow {background-color: rgb(0,0,0);}");
+ this->background_set = false;
}
} else {
- if (!this->nightModeEnabled) {
- if (this->oldGUIStyle) {
- if (this->wallpaperClassicDayFileExists) {
- this->setStyleSheet("QMainWindow { background: url(wallpaper-classic.png); background-repeat: no-repeat; background-position: center; }");
+ if (this->background_set == false) {
+ if (!this->nightModeEnabled) {
+ if (this->oldGUIStyle) {
+ if (this->wallpaperClassicDayFileExists) {
+ this->setStyleSheet("QMainWindow { background: url(wallpaper-classic.png); background-repeat: no-repeat; background-position: center; }");
+ } else {
+ this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }");
+ }
} else {
- this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }");
+ if (this->wallpaperDayFileExists) {
+ this->setStyleSheet("QMainWindow { background: url(wallpaper.png); background-repeat: no-repeat; background-position: center; }");
+ } else {
+ this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }");
+ }
}
} else {
- if (this->wallpaperDayFileExists) {
- this->setStyleSheet("QMainWindow { background: url(wallpaper.png); background-repeat: no-repeat; background-position: center; }");
+ if (this->oldGUIStyle) {
+ if (this->wallpaperClassicNightFileExists) {
+ this->setStyleSheet("QMainWindow { background: url(wallpaper-classic-night.png); background-repeat: no-repeat; background-position: center; }");
+ } else {
+ this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }");
+ }
} else {
- this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }");
- }
- }
- } else {
- if (this->oldGUIStyle) {
- if (this->wallpaperClassicNightFileExists) {
- this->setStyleSheet("QMainWindow { background: url(wallpaper-classic-night.png); background-repeat: no-repeat; background-position: center; }");
- } else {
- this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }");
- }
- } else {
- if (this->wallpaperNightFileExists) {
- this->setStyleSheet("QMainWindow { background: url(wallpaper-night.png); background-repeat: no-repeat; background-position: center; }");
- } else {
- this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }");
+ if (this->wallpaperNightFileExists) {
+ this->setStyleSheet("QMainWindow { background: url(wallpaper-night.png); background-repeat: no-repeat; background-position: center; }");
+ } else {
+ this->setStyleSheet("QMainWindow { background: url(:/black.png); background-repeat: no-repeat; background-position: center; }");
+ }
}
}
+ this->background_set = true;
}
}
diff --git a/src/autoapp/UI/SettingsWindow.cpp b/src/autoapp/UI/SettingsWindow.cpp
index cc6fdff..537c317 100644
--- a/src/autoapp/UI/SettingsWindow.cpp
+++ b/src/autoapp/UI/SettingsWindow.cpp
@@ -76,13 +76,6 @@ SettingsWindow::SettingsWindow(configuration::IConfiguration::Pointer configurat
ui_->horizontalGroupBox->hide();
ui_->groupBoxNetworking->hide();
- QFileInfo devModeFile("/tmp/dev_mode_enabled");
- QFileInfo DebugmodeFile("/tmp/usb_debug_mode");
-
- if (!devModeFile.exists() && !DebugmodeFile.exists()) {
- ui_->pushButtonNTP->hide();
- }
-
connect(ui_->pushButtonTab1, &QPushButton::clicked, this, &SettingsWindow::show_tab1);
connect(ui_->pushButtonTab2, &QPushButton::clicked, this, &SettingsWindow::show_tab2);
connect(ui_->pushButtonTab3, &QPushButton::clicked, this, &SettingsWindow::show_tab3);
diff --git a/src/autoapp/UI/mainwindow.ui b/src/autoapp/UI/mainwindow.ui
index 346d25c..fd8ed7b 100644
--- a/src/autoapp/UI/mainwindow.ui
+++ b/src/autoapp/UI/mainwindow.ui
@@ -243,7 +243,7 @@ color: rgb(255, 255, 255);
color: rgb(255, 255, 255);
- BuildID
+
Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter