wip
This commit is contained in:
@@ -427,24 +427,26 @@ void ExperimentalButton::updateState(const UIState &s, bool leadInfo) {
|
||||
|
||||
void ExperimentalButton::paintEvent(QPaintEvent *event) {
|
||||
QPainter p(this);
|
||||
// Custom steering wheel icon
|
||||
engage_img = wheelImages[wheelIcon];
|
||||
QPixmap img = wheelIcon ? engage_img : (experimental_mode ? experimental_img : engage_img);
|
||||
// Steering wheel icon disabled
|
||||
|
||||
QColor background_color = wheelIcon && !isDown() && engageable ?
|
||||
(scene.always_on_lateral_active ? QColor(10, 186, 181, 255) :
|
||||
(scene.conditional_status == 1 ? QColor(255, 246, 0, 255) :
|
||||
(experimental_mode ? QColor(218, 111, 37, 241) :
|
||||
(scene.navigate_on_openpilot ? QColor(49, 161, 238, 255) : QColor(0, 0, 0, 166))))) :
|
||||
QColor(0, 0, 0, 166);
|
||||
// // Custom steering wheel icon
|
||||
// engage_img = wheelImages[wheelIcon];
|
||||
// QPixmap img = wheelIcon ? engage_img : (experimental_mode ? experimental_img : engage_img);
|
||||
|
||||
if (!scene.show_driver_camera) {
|
||||
if (rotatingWheel || firefoxRandomEventTriggered) {
|
||||
drawIconRotate(p, QPoint(btn_size / 2, btn_size / 2 + y_offset), img, background_color, (isDown() || (!engageable && !scene.always_on_lateral_active)) ? 0.6 : 1.0, steeringAngleDeg);
|
||||
} else {
|
||||
drawIcon(p, QPoint(btn_size / 2, btn_size / 2 + y_offset), img, background_color, (isDown() || (!engageable && !scene.always_on_lateral_active)) ? 0.6 : 1.0);
|
||||
}
|
||||
}
|
||||
// QColor background_color = wheelIcon && !isDown() && engageable ?
|
||||
// (scene.always_on_lateral_active ? QColor(10, 186, 181, 255) :
|
||||
// (scene.conditional_status == 1 ? QColor(255, 246, 0, 255) :
|
||||
// (experimental_mode ? QColor(218, 111, 37, 241) :
|
||||
// (scene.navigate_on_openpilot ? QColor(49, 161, 238, 255) : QColor(0, 0, 0, 166))))) :
|
||||
// QColor(0, 0, 0, 166);
|
||||
|
||||
// if (!scene.show_driver_camera) {
|
||||
// if (rotatingWheel || firefoxRandomEventTriggered) {
|
||||
// drawIconRotate(p, QPoint(btn_size / 2, btn_size / 2 + y_offset), img, background_color, (isDown() || (!engageable && !scene.always_on_lateral_active)) ? 0.6 : 1.0, steeringAngleDeg);
|
||||
// } else {
|
||||
// drawIcon(p, QPoint(btn_size / 2, btn_size / 2 + y_offset), img, background_color, (isDown() || (!engageable && !scene.always_on_lateral_active)) ? 0.6 : 1.0);
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@@ -475,11 +477,12 @@ AnnotatedCameraWidget::AnnotatedCameraWidget(VisionStreamType type, QWidget* par
|
||||
// Neokii screen recorder
|
||||
QHBoxLayout *top_right_layout = new QHBoxLayout();
|
||||
top_right_layout->setSpacing(0);
|
||||
recorder_btn = new ScreenRecorder(this);
|
||||
top_right_layout->addWidget(recorder_btn);
|
||||
|
||||
experimental_btn = new ExperimentalButton(this);
|
||||
top_right_layout->addWidget(experimental_btn);
|
||||
// recorder_btn = new ScreenRecorder(this);
|
||||
// top_right_layout->addWidget(recorder_btn);
|
||||
|
||||
// experimental_btn = new ExperimentalButton(this);
|
||||
// top_right_layout->addWidget(experimental_btn);
|
||||
|
||||
main_layout->addLayout(top_right_layout, 0);
|
||||
main_layout->setAlignment(top_right_layout, Qt::AlignTop | Qt::AlignRight);
|
||||
|
||||
Reference in New Issue
Block a user