training guide updates (#21674)

* add progress bar

* shorter

* update lane change speed

* fix

* center

* fix cutoff
pull/21677/head
Adeeb Shihadeh 4 years ago committed by GitHub
parent 2f18715f76
commit 75904ed745
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. BIN
      selfdrive/assets/training/step10.png
  2. BIN
      selfdrive/assets/training_wide/step0.png
  3. BIN
      selfdrive/assets/training_wide/step10.png
  4. BIN
      selfdrive/assets/training_wide/step9.png
  5. 10
      selfdrive/ui/qt/offroad/onboarding.cc

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 900 KiB

After

Width:  |  Height:  |  Size: 897 KiB

@ -34,12 +34,18 @@ void TrainingGuide::paintEvent(QPaintEvent *event) {
QPainter painter(this); QPainter painter(this);
QRect bg(0, 0, painter.device()->width(), painter.device()->height()); QRect bg(0, 0, painter.device()->width(), painter.device()->height());
QBrush bgBrush("#000000"); painter.fillRect(bg, QColor("#000000"));
painter.fillRect(bg, bgBrush);
QRect rect(image.rect()); QRect rect(image.rect());
rect.moveCenter(bg.center()); rect.moveCenter(bg.center());
painter.drawImage(rect.topLeft(), image); painter.drawImage(rect.topLeft(), image);
// progress bar
if (currentIndex > 0 && currentIndex < (boundingRect.size() - 2)) {
const int h = 20;
const int w = (currentIndex / (float)(boundingRect.size() - 2)) * width();
painter.fillRect(QRect(0, height() - h, w, h), QColor("#465BEA"));
}
} }
void TermsPage::showEvent(QShowEvent *event) { void TermsPage::showEvent(QShowEvent *event) {

Loading…
Cancel
Save