training guide updates (#21674)
* add progress bar * shorter * update lane change speed * fix * center * fix cutoffpull/21677/head
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 1.7 MiB After Width: | Height: | Size: 1.7 MiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 900 KiB After Width: | Height: | Size: 897 KiB |
|
@ -34,12 +34,18 @@ void TrainingGuide::paintEvent(QPaintEvent *event) {
|
|||
QPainter painter(this);
|
||||
|
||||
QRect bg(0, 0, painter.device()->width(), painter.device()->height());
|
||||
QBrush bgBrush("#000000");
|
||||
painter.fillRect(bg, bgBrush);
|
||||
painter.fillRect(bg, QColor("#000000"));
|
||||
|
||||
QRect rect(image.rect());
|
||||
rect.moveCenter(bg.center());
|
||||
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) {
|
||||
|
|