diff --git a/CMakeLists.txt b/CMakeLists.txt index 3b5ef0b10..2610c503f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1116,6 +1116,11 @@ qt_add_resources(${PROJECT_NAME} "${PROJECT_NAME}_large_resources" images/icon_close_32.svg images/icon_info_32.svg images/icon_info_48.svg + images/icon_WiFi_1_32.svg + images/icon_WiFi_2_32.svg + images/icon_WiFi_3_32.svg + images/icon_WiFi_4_32.svg + images/icon_WiFi_noconnection_32.svg images/welcome-brief.png images/welcome-controls.png images/welcome-dark.png diff --git a/components/StatusBar.qml b/components/StatusBar.qml index e2091b3db..3b00771e3 100644 --- a/components/StatusBar.qml +++ b/components/StatusBar.qml @@ -5,6 +5,7 @@ import QtQuick import QtQuick.Controls as C +import QtQuick.Controls.impl as CP import Victron.VenusOS Rectangle { @@ -104,6 +105,48 @@ Rectangle { text: root.title.length > 0 ? root.title : ClockTime.currentTime } + Row { + id: connectivityRow + + anchors { + left: clockLabel.right + leftMargin: Theme.geometry_statusBar_rightSideRow_horizontalMargin + verticalCenter: parent.verticalCenter + } + spacing: Theme.geometry_statusBar_rightSideRow_horizontalMargin + + CP.IconImage { + anchors.verticalCenter: parent.verticalCenter + color: Theme.color_font_primary + source: { + if (!signalStrength.isValid) { + return "" + } else if (signalStrength.value > 75) { + return "qrc:/images/icon_WiFi_4_32.svg" + } else if (signalStrength.value > 50) { + return "qrc:/images/icon_WiFi_3_32.svg" + } else if (signalStrength.value > 25) { + return "qrc:/images/icon_WiFi_2_32.svg" + } else if (signalStrength.value > 0) { + return "qrc:/images/icon_WiFi_1_32.svg" + } else { + return "qrc:/images/icon_WiFi_noconnection_32.svg" + } + } + + VeQuickItem { + id: signalStrength + + uid: Global.venusPlatform.serviceUid + "/Network/Wifi/SignalStrength" + } + } + + GsmStatusIcon { + height: Theme.geometry_status_bar_gsmModem_icon_height + anchors.verticalCenter: parent.verticalCenter + } + } + Row { id: rightSideRow anchors { diff --git a/images/icon_WiFi_1_32.svg b/images/icon_WiFi_1_32.svg new file mode 100644 index 000000000..df756958f --- /dev/null +++ b/images/icon_WiFi_1_32.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/images/icon_WiFi_2_32.svg b/images/icon_WiFi_2_32.svg new file mode 100644 index 000000000..48df3fbbc --- /dev/null +++ b/images/icon_WiFi_2_32.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/images/icon_WiFi_3_32.svg b/images/icon_WiFi_3_32.svg new file mode 100644 index 000000000..dde4c4d40 --- /dev/null +++ b/images/icon_WiFi_3_32.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/images/icon_WiFi_4_32.svg b/images/icon_WiFi_4_32.svg new file mode 100644 index 000000000..5061cf994 --- /dev/null +++ b/images/icon_WiFi_4_32.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/images/icon_WiFi_error_32.svg b/images/icon_WiFi_error_32.svg new file mode 100644 index 000000000..b1281e83d --- /dev/null +++ b/images/icon_WiFi_error_32.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/images/icon_WiFi_noconnection_32.svg b/images/icon_WiFi_noconnection_32.svg new file mode 100644 index 000000000..cd47c9f6f --- /dev/null +++ b/images/icon_WiFi_noconnection_32.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/themes/geometry/FiveInch.json b/themes/geometry/FiveInch.json index d891ac97d..b2118609d 100644 --- a/themes/geometry/FiveInch.json +++ b/themes/geometry/FiveInch.json @@ -390,6 +390,8 @@ "geometry_settings_gsmModem_signalStrengthBars_bar_width": 4, "geometry_settings_gsmModem_signalStrengthBars_bar_incremental_height": 6, + "geometry_status_bar_gsmModem_icon_height": 24, + "geometry_vebusDeviceListPage_quantityTable_row_spacing": 4, "geometry_vebusDeviceListPage_quantityTable_firstColumn_width": 39, "geometry_vebusDeviceListPage_quantityTable_header_height": 58, diff --git a/themes/geometry/SevenInch.json b/themes/geometry/SevenInch.json index bed627602..d20fe311e 100644 --- a/themes/geometry/SevenInch.json +++ b/themes/geometry/SevenInch.json @@ -390,6 +390,8 @@ "geometry_settings_gsmModem_signalStrengthBars_bar_width": 4, "geometry_settings_gsmModem_signalStrengthBars_bar_incremental_height": 6, + "geometry_status_bar_gsmModem_icon_height": 24, + "geometry_vebusDeviceListPage_quantityTable_row_spacing": 4, "geometry_vebusDeviceListPage_quantityTable_firstColumn_width": 39, "geometry_vebusDeviceListPage_quantityTable_header_height": 58,