@ -79,8 +79,8 @@ void WifiUI::refresh() {
hlayout - > addWidget ( new QLabel ( QString : : fromUtf8 ( network . ssid ) ) ) ;
hlayout - > addWidget ( new QLabel ( QString : : fromUtf8 ( network . ssid ) ) ) ;
// strength indicator
// strength indicator
unsigned int strength_scale = std : : round ( network . strength / 25.0 ) * 25 ;
unsigned int strength_scale = network . strength / 17 ;
QPixmap pix ( " ../assets/offroad/indicator_wifi _ " + QString : : number ( strength_scale ) + " .png " ) ;
QPixmap pix ( " ../assets/images/network _ " + QString : : number ( strength_scale ) + " .png " ) ;
QLabel * icon = new QLabel ( ) ;
QLabel * icon = new QLabel ( ) ;
icon - > setPixmap ( pix . scaledToWidth ( 100 , Qt : : SmoothTransformation ) ) ;
icon - > setPixmap ( pix . scaledToWidth ( 100 , Qt : : SmoothTransformation ) ) ;
icon - > setSizePolicy ( QSizePolicy ( QSizePolicy : : Fixed , QSizePolicy : : Fixed ) ) ;
icon - > setSizePolicy ( QSizePolicy ( QSizePolicy : : Fixed , QSizePolicy : : Fixed ) ) ;
@ -99,7 +99,6 @@ void WifiUI::refresh() {
QWidget * w = new QWidget ;
QWidget * w = new QWidget ;
w - > setLayout ( hlayout ) ;
w - > setLayout ( hlayout ) ;
vlayout - > addWidget ( w ) ;
vlayout - > addWidget ( w ) ;
w - > setStyleSheet ( R " (
w - > setStyleSheet ( R " (
QLabel {
QLabel {
font - size : 40 px ;
font - size : 40 px ;
@ -114,6 +113,9 @@ void WifiUI::refresh() {
background - color : # 114265 ;
background - color : # 114265 ;
}
}
) " );
) " );
if ( i > 10 ) {
return ;
}
}
}
}
}