OnroadHud: use function loadPixmap (#23292)

old-commit-hash: bf4d875c5af226224f6d4e826c3d03d6765b89a4
This commit is contained in:
Dean Lee
2021-12-23 02:10:24 +08:00
committed by GitHub
parent af8143a333
commit d30f82421d
+2 -2
View File
@@ -163,8 +163,8 @@ void OnroadAlerts::paintEvent(QPaintEvent *event) {
// OnroadHud
OnroadHud::OnroadHud(QWidget *parent) : QWidget(parent) {
engage_img = QPixmap("../assets/img_chffr_wheel.png").scaled(img_size, img_size, Qt::KeepAspectRatio, Qt::SmoothTransformation);
dm_img = QPixmap("../assets/img_driver_face.png").scaled(img_size, img_size, Qt::KeepAspectRatio, Qt::SmoothTransformation);
engage_img = loadPixmap("../assets/img_chffr_wheel.png", {img_size, img_size});
dm_img = loadPixmap("../assets/img_driver_face.png", {img_size, img_size});
connect(this, &OnroadHud::valueChanged, [=] { update(); });
}