networking: fix stretching with only 1 network (#21675)

pull/21677/head
sshane 4 years ago committed by GitHub
parent 4e6c268b17
commit 7193ff57e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      selfdrive/ui/qt/offroad/networking.cc

@ -282,7 +282,7 @@ void WifiUI::refresh() {
strength->setPixmap(strengths[std::clamp((int)network.strength/26, 0, 3)]);
hlayout->addWidget(strength, 0, Qt::AlignRight);
main_layout->addLayout(hlayout, 1);
main_layout->addLayout(hlayout);
// Don't add the last horizontal line
if (i+1 < wifi->seen_networks.size()) {
@ -290,5 +290,5 @@ void WifiUI::refresh() {
}
i++;
}
main_layout->addStretch(2);
main_layout->addStretch(1);
}

Loading…
Cancel
Save