diff --git a/common/tier4_state_rviz_plugin/src/autoware_state_panel.cpp b/common/tier4_state_rviz_plugin/src/autoware_state_panel.cpp index 45d5b3117ce70..e02422a0b6f61 100644 --- a/common/tier4_state_rviz_plugin/src/autoware_state_panel.cpp +++ b/common/tier4_state_rviz_plugin/src/autoware_state_panel.cpp @@ -560,18 +560,26 @@ void AutowareStatePanel::onRoute(const RouteState::ConstSharedPtr msg) if (msg->state == RouteState::SET) { activateButton(clear_route_button_ptr_); + clear_route_button_ptr_->updateStyle( + "Clear Route", + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_low.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.primary.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_highest.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_high.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_high.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_highest.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.on_surface.c_str())); } else { - clear_route_button_ptr_->setStyleSheet( - QString("QPushButton {" - "background-color: %1;color: %2;" - "border: 2px solid %3;" - "font-weight: bold;" - "}") - .arg(autoware::state_rviz_plugin::colors::default_colors.surface_container_highest.c_str()) - .arg(autoware::state_rviz_plugin::colors::default_colors.outline.c_str()) - .arg( - autoware::state_rviz_plugin::colors::default_colors.surface_container_highest.c_str())); deactivateButton(clear_route_button_ptr_); + clear_route_button_ptr_->updateStyle( + "Clear Route", + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_low.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.primary.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_highest.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_high.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_high.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_highest.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.on_surface.c_str())); } } @@ -608,6 +616,15 @@ void AutowareStatePanel::onLocalization(const LocalizationInitializationState::C localization_icon->updateStyle(state, bgColor); localization_label_ptr_->setText(localization_state); + init_by_gnss_button_ptr_->updateStyle( + "Initialize with GNSS", + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_low.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.primary.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_highest.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_high.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_high.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_high.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.on_surface.c_str())); } void AutowareStatePanel::onMotion(const MotionState::ConstSharedPtr msg) @@ -646,8 +663,26 @@ void AutowareStatePanel::onMotion(const MotionState::ConstSharedPtr msg) if (msg->state == MotionState::STARTING) { activateButton(accept_start_button_ptr_); + accept_start_button_ptr_->updateStyle( + "Accept Start", + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_low.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.primary.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_highest.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_high.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_high.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_highest.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.on_surface.c_str())); } else { deactivateButton(accept_start_button_ptr_); + accept_start_button_ptr_->updateStyle( + "Accept Start", + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_low.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.primary.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_highest.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_high.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_high.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.surface_container_highest.c_str()), + QColor(autoware::state_rviz_plugin::colors::default_colors.on_surface.c_str())); } }