diff --git a/selfdrive/ui/qt/offroad/networking.cc b/selfdrive/ui/qt/offroad/networking.cc index 0a5c07af7..07197ec4b 100644 --- a/selfdrive/ui/qt/offroad/networking.cc +++ b/selfdrive/ui/qt/offroad/networking.cc @@ -12,6 +12,7 @@ #include "selfdrive/ui/qt/widgets/controls.h" #include "selfdrive/ui/qt/widgets/scrollview.h" +static const int ICON_WIDTH = 49; // Networking functions @@ -217,9 +218,9 @@ WifiUI::WifiUI(QWidget *parent, WifiManager* wifi) : QWidget(parent), wifi(wifi) QPixmap pix(ASSET_PATH + "/offroad/icon_wifi_strength_" + s + ".svg"); strengths.push_back(pix.scaledToHeight(68, Qt::SmoothTransformation)); } - lock = QPixmap(ASSET_PATH + "offroad/icon_lock_closed.svg").scaledToWidth(49, Qt::SmoothTransformation); - checkmark = QPixmap(ASSET_PATH + "offroad/icon_checkmark.svg").scaledToWidth(49, Qt::SmoothTransformation); - circled_slash = QPixmap(ASSET_PATH + "img_circled_slash.svg").scaledToWidth(49, Qt::SmoothTransformation); + lock = QPixmap(ASSET_PATH + "offroad/icon_lock_closed.svg").scaledToWidth(ICON_WIDTH, Qt::SmoothTransformation); + checkmark = QPixmap(ASSET_PATH + "offroad/icon_checkmark.svg").scaledToWidth(ICON_WIDTH, Qt::SmoothTransformation); + circled_slash = QPixmap(ASSET_PATH + "img_circled_slash.svg").scaledToWidth(ICON_WIDTH, Qt::SmoothTransformation); scanningLabel = new QLabel(tr("Scanning for networks...")); scanningLabel->setStyleSheet("font-size: 65px;"); @@ -335,6 +336,7 @@ WifiItem::WifiItem(const QString &connecting_text, const QString &forget_text, Q hlayout->addWidget(iconLabel = new QLabel(), 0, Qt::AlignRight); hlayout->addWidget(strengthLabel = new QLabel(), 0, Qt::AlignRight); + iconLabel->setFixedWidth(ICON_WIDTH); QObject::connect(forgetBtn, &QPushButton::clicked, [this]() { emit forgotNetwork(network); }); QObject::connect(ssidLabel, &ElidedLabel::clicked, [this]() { if (network.connected == ConnectedType::DISCONNECTED) emit connectToNetwork(network);