@@ -24,6 +24,7 @@ FocusScope {
2424 signal leftButtonClicked ()
2525 signal rightButtonClicked ()
2626 signal auxButtonClicked ()
27+ signal wifiButtonClicked ()
2728 // PageStack.get(...) returns an Item, so the arg for 'popToPage' needs to be 'Item'. If we make it a 'Page', it works fine on the desktop,
2829 // but shows an unusual failure on the device. There is an error message about "passing incompatible arguments to signals is not supported",
2930 // and the page stack pops 1 too many pages.
@@ -204,7 +205,7 @@ FocusScope {
204205 }
205206 }
206207
207- KeyNavigation .right : notificationButton
208+ KeyNavigation .right : wifiButton
208209
209210 Connections {
210211 target: root .pageStack
@@ -235,24 +236,19 @@ FocusScope {
235236 visible: ! breadcrumbs .visible
236237 spacing: Theme .geometry_statusBar_spacing
237238
238- CP .IconImage {
239- anchors .verticalCenter : parent .verticalCenter
240- color: Theme .color_font_primary
241- source: {
242- if (! signalStrength .valid ) {
243- return " "
244- } else if (signalStrength .value > 75 ) {
245- return " qrc:/images/icon_WiFi_4_32.svg"
246- } else if (signalStrength .value > 50 ) {
247- return " qrc:/images/icon_WiFi_3_32.svg"
248- } else if (signalStrength .value > 25 ) {
249- return " qrc:/images/icon_WiFi_2_32.svg"
250- } else if (signalStrength .value > 0 ) {
251- return " qrc:/images/icon_WiFi_1_32.svg"
252- } else {
253- return " qrc:/images/icon_WiFi_noconnection_32.svg"
254- }
255- }
239+ StatusBarButton {
240+ id: wifiButton
241+
242+ icon .source : ! signalStrength .valid ? " "
243+ : signalStrength .value > 75 ? " qrc:/images/icon_WiFi_4_32.svg"
244+ : signalStrength .value > 50 ? " qrc:/images/icon_WiFi_3_32.svg"
245+ : signalStrength .value > 25 ? " qrc:/images/icon_WiFi_2_32.svg"
246+ : signalStrength .value > 0 ? " qrc:/images/icon_WiFi_1_32.svg"
247+ : " qrc:/images/icon_WiFi_noconnection_32.svg"
248+
249+ KeyNavigation .right : notificationButton
250+
251+ onClicked: root .wifiButtonClicked ()
256252
257253 VeQuickItem {
258254 id: signalStrength
0 commit comments