wip
This commit is contained in:
Binary file not shown.
@@ -17,6 +17,9 @@
|
||||
// HomeWindow: the container for the offroad and onroad UIs
|
||||
|
||||
HomeWindow::HomeWindow(QWidget* parent) : QWidget(parent) {
|
||||
// CLEARPILOT Sidebar set to invisible in drive view.
|
||||
params.putBool("Sidebar", false);
|
||||
|
||||
QHBoxLayout *main_layout = new QHBoxLayout(this);
|
||||
main_layout->setMargin(0);
|
||||
main_layout->setSpacing(0);
|
||||
@@ -107,19 +110,25 @@ void HomeWindow::showDriverView(bool show, bool started) {
|
||||
}
|
||||
|
||||
void HomeWindow::mousePressEvent(QMouseEvent* e) {
|
||||
// Handle sidebar collapsing
|
||||
// CLEARPILOT todo - tap on main goes straight to settings
|
||||
// Unless we click a debug widget.
|
||||
if ((onroad->isVisible() || body->isVisible()) && (!sidebar->isVisible() || e->x() > sidebar->width())) {
|
||||
sidebar->setVisible(!sidebar->isVisible() && !onroad->isMapVisible());
|
||||
uiState()->scene.map_open = onroad->isMapVisible();
|
||||
params.putBool("Sidebar", sidebar->isVisible());
|
||||
}
|
||||
|
||||
// Handle sidebar collapsing
|
||||
// if ((onroad->isVisible() || body->isVisible()) && (!sidebar->isVisible() || e->x() > sidebar->width())) {
|
||||
// sidebar->setVisible(!sidebar->isVisible() && !onroad->isMapVisible());
|
||||
// uiState()->scene.map_open = onroad->isMapVisible();
|
||||
// params.putBool("Sidebar", sidebar->isVisible());
|
||||
// }
|
||||
|
||||
// CLEARPILOT - click ready shows home
|
||||
if (!onroad->isVisible() && ready->isVisible()) {
|
||||
slayout->setCurrentWidget(home);
|
||||
}
|
||||
|
||||
// Todo: widgets
|
||||
if (onroad->isVisible()) {
|
||||
emit openSettings();
|
||||
}
|
||||
}
|
||||
|
||||
void HomeWindow::mouseDoubleClickEvent(QMouseEvent* e) {
|
||||
|
||||
@@ -250,13 +250,16 @@ class Soundd:
|
||||
11: "world_frog_day",
|
||||
}
|
||||
|
||||
if current_holiday_theme != 0:
|
||||
theme_name = holiday_theme_configuration.get(current_holiday_theme)
|
||||
self.sound_directory = BASEDIR + ("/selfdrive/frogpilot/assets/holiday_themes/" + theme_name + "/sounds/")
|
||||
self.goat_scream = False
|
||||
else:
|
||||
theme_name = theme_configuration.get(custom_sounds)
|
||||
self.sound_directory = BASEDIR + ("/selfdrive/frogpilot/assets/custom_themes/" + theme_name + "/sounds/" if custom_sounds != 0 else "/selfdrive/assets/sounds/")
|
||||
# Clearpilot: Impl theme switcher
|
||||
# if current_holiday_theme != 0:
|
||||
# theme_name = holiday_theme_configuration.get(current_holiday_theme)
|
||||
# self.sound_directory = BASEDIR + ("/selfdrive/frogpilot/assets/holiday_themes/" + theme_name + "/sounds/")
|
||||
# self.goat_scream = False
|
||||
# else:
|
||||
# theme_name = theme_configuration.get(custom_sounds)
|
||||
# self.sound_directory = BASEDIR + ("/selfdrive/clearpilot/theme/" + theme_name + "/sounds/" if custom_sounds != 0 else "/selfdrive/assets/sounds/")
|
||||
|
||||
self.sound_directory = BASEDIR + ("/selfdrive/clearpilot/theme/clearpilot/sounds/" if custom_sounds != 0 else "/selfdrive/assets/sounds/")
|
||||
|
||||
if self.sound_directory != self.previous_sound_directory:
|
||||
self.load_sounds()
|
||||
|
||||
Reference in New Issue
Block a user