diff --git a/assets/black.png b/assets/black.png
new file mode 100644
index 0000000..f4d8cbb
Binary files /dev/null and b/assets/black.png differ
diff --git a/assets/resources.qrc b/assets/resources.qrc
index 592a211..c31624e 100644
--- a/assets/resources.qrc
+++ b/assets/resources.qrc
@@ -31,6 +31,7 @@
rearcam-hot.png
recordactive-hot.png
lock-hot.png
+ black.png
Roboto-Regular.ttf
diff --git a/src/autoapp/UI/MainWindow.cpp b/src/autoapp/UI/MainWindow.cpp
index c666fee..eb0cfcf 100644
--- a/src/autoapp/UI/MainWindow.cpp
+++ b/src/autoapp/UI/MainWindow.cpp
@@ -227,8 +227,11 @@ MainWindow::MainWindow(configuration::IConfiguration::Pointer configuration, QWi
this->customBrightnessControl = true;
}
+ ui_->kodiBG->hide();
if (!this->kodiButtonForce) {
ui_->pushButtonKodi->hide();
+ } else {
+ system("/usr/local/bin/autoapp_helper startkodimonitor &");
}
ui_->horizontalSliderBrightness->hide();
@@ -569,9 +572,24 @@ void f1x::openauto::autoapp::ui::MainWindow::showTime()
if (externalExitFile.exists()) {
f1x::openauto::autoapp::ui::MainWindow::MainWindow::exit();
}
- }
+ if (this->kodiButtonForce) {
+ QFileInfo kodiRunningFile("/tmp/kodi_running");
+ if (kodiRunningFile.exists()) {
+ if (ui_->kodiBG->isVisible() == false) {
+ ui_->kodiBG->hide();
+ QPixmap image;
+ image.load(":/black.png");
+ ui_->kodiBG->setPixmap(image);
+ ui_->kodiBG->show();
+ }
+ } else {
+ if (ui_->kodiBG->isVisible() == true) {
+ ui_->kodiBG->hide();
+ }
+ }
+ }
+ }
ui_->Digital_clock->setText(time_text);
sleep_for(milliseconds(10));
-
}
diff --git a/src/autoapp/UI/mainwindow.ui b/src/autoapp/UI/mainwindow.ui
index 6c8b1f2..f8684a7 100644
--- a/src/autoapp/UI/mainwindow.ui
+++ b/src/autoapp/UI/mainwindow.ui
@@ -748,6 +748,16 @@ QPushButton:pressed { background: orange; border: none; }
true
+
+
+
+ 0
+ 0
+ 800
+ 480
+
+
+
masterButtonBG
pushButtonSettings
pushButtonLock
@@ -777,6 +787,7 @@ QPushButton:pressed { background: orange; border: none; }
pushButtonCancel
systemConfigInProgress
systemDebugging
+ kodiBG
pushButtonRearcamBack