OnroadHud: use function loadPixmap (#23292)

This commit is contained in:
Dean Lee
2021-12-23 02:10:24 +08:00
committed by GitHub
parent db6c477373
commit bf4d875c5a
+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(); });
}