Gui bg rework / remove build id
This commit is contained in:
parent
360ffeb6f9
commit
03ad005f80
@ -221,6 +221,8 @@ private:
|
|||||||
bool hotspotActive = false;
|
bool hotspotActive = false;
|
||||||
|
|
||||||
int currentPlaylistIndex = 0;
|
int currentPlaylistIndex = 0;
|
||||||
|
|
||||||
|
bool background_set = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -180,33 +180,33 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi
|
|||||||
|
|
||||||
// Build Version string for mainscreen
|
// Build Version string for mainscreen
|
||||||
// Get git version string
|
// Get git version string
|
||||||
QFileInfo vFile("/etc/crankshaft.build");
|
//QFileInfo vFile("/etc/crankshaft.build");
|
||||||
if (vFile.exists()) {
|
//if (vFile.exists()) {
|
||||||
QFile versionFile(QString("/etc/crankshaft.build"));
|
// QFile versionFile(QString("/etc/crankshaft.build"));
|
||||||
versionFile.open(QIODevice::ReadOnly);
|
// versionFile.open(QIODevice::ReadOnly);
|
||||||
QTextStream data_version(&versionFile);
|
// QTextStream data_version(&versionFile);
|
||||||
QString lineversion = data_version.readAll();
|
// QString lineversion = data_version.readAll();
|
||||||
versionFile.close();
|
// versionFile.close();
|
||||||
this->bversion=lineversion.simplified();
|
// this->bversion=lineversion.simplified();
|
||||||
} else {
|
//} else {
|
||||||
this->bversion="unknown";
|
// this->bversion="unknown";
|
||||||
}
|
//}
|
||||||
|
|
||||||
// Get date string
|
// Get date string
|
||||||
QFileInfo dFile("/etc/crankshaft.build");
|
//QFileInfo dFile("/etc/crankshaft.build");
|
||||||
if (dFile.exists()) {
|
//if (dFile.exists()) {
|
||||||
QFile dateFile(QString("/etc/crankshaft.date"));
|
// QFile dateFile(QString("/etc/crankshaft.date"));
|
||||||
dateFile.open(QIODevice::ReadOnly);
|
// dateFile.open(QIODevice::ReadOnly);
|
||||||
QTextStream data_date(&dateFile);
|
// QTextStream data_date(&dateFile);
|
||||||
QString linedate = data_date.readAll();
|
// QString linedate = data_date.readAll();
|
||||||
dateFile.close();
|
// dateFile.close();
|
||||||
this->bdate=linedate.simplified();
|
// this->bdate=linedate.simplified();
|
||||||
} else {
|
//} else {
|
||||||
this->bdate="- - -";
|
// this->bdate="- - -";
|
||||||
}
|
//}
|
||||||
|
|
||||||
QString buildid = "Build: " + this->bversion + " (" + this->bdate + ")";
|
//QString buildid = "Build: " + this->bversion + " (" + this->bdate + ")";
|
||||||
ui_->BuildID->setText(buildid);
|
//ui_->BuildID->setText(buildid);
|
||||||
|
|
||||||
// enable connects while cam is enabled
|
// enable connects while cam is enabled
|
||||||
if (this->cameraButtonForce) {
|
if (this->cameraButtonForce) {
|
||||||
@ -1026,36 +1026,40 @@ void f1x::openauto::autoapp::ui::MainWindow::showTime()
|
|||||||
if (ui_->centralWidget->isVisible() == true) {
|
if (ui_->centralWidget->isVisible() == true) {
|
||||||
ui_->centralWidget->hide();
|
ui_->centralWidget->hide();
|
||||||
this->setStyleSheet("QMainWindow {background-color: rgb(0,0,0);}");
|
this->setStyleSheet("QMainWindow {background-color: rgb(0,0,0);}");
|
||||||
|
this->background_set = false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!this->nightModeEnabled) {
|
if (this->background_set == false) {
|
||||||
if (this->oldGUIStyle) {
|
if (!this->nightModeEnabled) {
|
||||||
if (this->wallpaperClassicDayFileExists) {
|
if (this->oldGUIStyle) {
|
||||||
this->setStyleSheet("QMainWindow { background: url(wallpaper-classic.png); background-repeat: no-repeat; background-position: center; }");
|
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 {
|
} 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 {
|
} else {
|
||||||
if (this->wallpaperDayFileExists) {
|
if (this->oldGUIStyle) {
|
||||||
this->setStyleSheet("QMainWindow { background: url(wallpaper.png); background-repeat: no-repeat; background-position: center; }");
|
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 {
|
} 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 {
|
||||||
} else {
|
this->setStyleSheet("QMainWindow { background: url(:/black.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 {
|
|
||||||
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,13 +76,6 @@ SettingsWindow::SettingsWindow(configuration::IConfiguration::Pointer configurat
|
|||||||
ui_->horizontalGroupBox->hide();
|
ui_->horizontalGroupBox->hide();
|
||||||
ui_->groupBoxNetworking->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_->pushButtonTab1, &QPushButton::clicked, this, &SettingsWindow::show_tab1);
|
||||||
connect(ui_->pushButtonTab2, &QPushButton::clicked, this, &SettingsWindow::show_tab2);
|
connect(ui_->pushButtonTab2, &QPushButton::clicked, this, &SettingsWindow::show_tab2);
|
||||||
connect(ui_->pushButtonTab3, &QPushButton::clicked, this, &SettingsWindow::show_tab3);
|
connect(ui_->pushButtonTab3, &QPushButton::clicked, this, &SettingsWindow::show_tab3);
|
||||||
|
@ -243,7 +243,7 @@ color: rgb(255, 255, 255);</string>
|
|||||||
color: rgb(255, 255, 255);</string>
|
color: rgb(255, 255, 255);</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>BuildID</string>
|
<string/>
|
||||||
</property>
|
</property>
|
||||||
<property name="alignment">
|
<property name="alignment">
|
||||||
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user