diff --git a/CMakeLists.txt b/CMakeLists.txt index 14bf65b7..c015e7e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -169,6 +169,7 @@ qt_add_qml_module(${CMAKE_PROJECT_NAME} qml/components/ItemNoPlants.qml qml/components/ItemNoJournal.qml qml/components/LuxBox.qml + qml/components/PhBox.qml qml/components/PlantCalendarWidget.qml qml/components/PlantHardinessWidget.qml qml/components/PlantSizeWidget.qml diff --git a/qml/DesktopHeader.qml b/qml/DesktopHeader.qml index e2551fe3..1af6627d 100644 --- a/qml/DesktopHeader.qml +++ b/qml/DesktopHeader.qml @@ -113,7 +113,7 @@ Rectangle { onEntered: { buttonBackBg.opacity = 0.5; } onExited: { buttonBackBg.opacity = 0; buttonBack.width = 32; } - onPressed: buttonBack.width = 24 + onPressed: buttonBack.width = 28 onReleased: buttonBack.width = 32 onClicked: backButtonClicked() diff --git a/qml/DevicePlantSensorSettings.qml b/qml/DevicePlantSensorSettings.qml index 2be45997..3568daca 100644 --- a/qml/DevicePlantSensorSettings.qml +++ b/qml/DevicePlantSensorSettings.qml @@ -508,6 +508,10 @@ Flickable { backgroundColor: Theme.colorBackground iconColor: Theme.colorIcon source: UtilsDeviceSensors.getDeviceSensorIcon(modelData.sensorId) + sourceRotation: { + if (source == "qrc:/IconLibrary/material-symbols/sensors/tonality.svg") return 90 + return 0 + } } Column { anchors.verticalCenter: parent.verticalCenter diff --git a/qml/PlantScreen.qml b/qml/PlantScreen.qml index 091a4ea4..80270baf 100644 --- a/qml/PlantScreen.qml +++ b/qml/PlantScreen.qml @@ -1267,12 +1267,12 @@ Grid { border.color: Qt.darker(color, 1.03) IconSvg { - width: 28 - height: 28 anchors.top: parent.top anchors.topMargin: 8 anchors.left: parent.left anchors.leftMargin: 8 + width: 28 + height: 28 opacity: 0.66 color: Theme.colorSubText @@ -1320,20 +1320,16 @@ Grid { Item { id: itemHygro - height: 40 anchors.left: parent.left - anchors.leftMargin: 0 anchors.right: parent.right - anchors.rightMargin: 0 + height: 40 IconSvg { id: imageHygro - width: 24 - height: 24 anchors.top: parent.top - anchors.topMargin: 0 anchors.left: parent.left - anchors.leftMargin: 0 + width: 24 + height: 24 color: Theme.colorSubText source: "qrc:/IconLibrary/material-icons/duotone/water_mid.svg" @@ -1378,19 +1374,16 @@ Grid { id: itemCondu height: 40 anchors.left: parent.left - anchors.leftMargin: 0 anchors.right: parent.right - anchors.rightMargin: 0 IconSvg { id: imageCondu - width: 24 - height: 24 anchors.top: parent.top - anchors.topMargin: 0 anchors.left: parent.left - anchors.leftMargin: 0 + width: 24 + height: 24 + rotation: 90 color: Theme.colorSubText source: "qrc:/IconLibrary/material-symbols/sensors/tonality.svg" } @@ -1433,19 +1426,16 @@ Grid { id: itemSoilPH height: 64 anchors.left: parent.left - anchors.leftMargin: 0 anchors.right: parent.right - anchors.rightMargin: 0 IconSvg { id: imageSoilPH - width: 24 - height: 24 anchors.top: parent.top - anchors.topMargin: 0 anchors.left: parent.left - anchors.leftMargin: 0 + width: 24 + height: 24 + rotation: 90 color: Theme.colorSubText source: "qrc:/IconLibrary/material-symbols/sensors/tonality.svg" } @@ -1492,95 +1482,29 @@ Grid { spacing: 3 property int phsz: (rangeSlider_soilPH.width - 2*rangeSlider_soilPH.padding - 4 - 5*spacing) / 6 - Rectangle { // 4 + PhBox { width: parent.phsz - height: 20 - radius: Theme.componentRadius - color: "#ff914d" - - Text { - anchors.centerIn: parent - text: "4" - textFormat: Text.PlainText - color: "white" - font.bold: true - font.pixelSize: Theme.fontSizeContentVerySmall - } + text: "4" } - Rectangle { // 5 + PhBox { width: parent.phsz - height: 20 - radius: Theme.componentRadius - color: "#ffbd59" - - Text { - anchors.centerIn: parent - text: "5" - textFormat: Text.PlainText - color: "white" - font.bold: true - font.pixelSize: Theme.fontSizeContentVerySmall - } + text: "5" } - Rectangle { // 6 + PhBox { width: parent.phsz - height: 20 - radius: Theme.componentRadius - color: "#ffde59" - - Text { - anchors.centerIn: parent - text: "6" - textFormat: Text.PlainText - color: "white" - font.bold: true - font.pixelSize: Theme.fontSizeContentVerySmall - } + text: "6" } - Rectangle { // 7 + PhBox { width: parent.phsz - height: 20 - radius: Theme.componentRadius - color: "#c9e265" - - Text { - anchors.centerIn: parent - text: "7" - textFormat: Text.PlainText - color: "white" - font.bold: true - font.pixelSize: Theme.fontSizeContentVerySmall - } + text: "7" } - Rectangle { // 8 + PhBox { width: parent.phsz - height: 20 - radius: Theme.componentRadius - color: "#03989e" - - Text { - anchors.centerIn: parent - text: "8" - textFormat: Text.PlainText - color: "white" - font.bold: true - font.pixelSize: Theme.fontSizeContentVerySmall - } + text: "8" } - Rectangle { // 9 + PhBox { width: parent.phsz - height: 20 - radius: Theme.componentRadius - color: "#2163bb" - - Text { - anchors.centerIn: parent - text: "9" - textFormat: Text.PlainText - color: "white" - font.bold: true - font.pixelSize: Theme.fontSizeContentVerySmall - } + text: "9" } } } @@ -1589,22 +1513,19 @@ Grid { Item { id: itemTemp height: 40 - anchors.right: parent.right - anchors.rightMargin: 0 anchors.left: parent.left - anchors.leftMargin: 0 + anchors.right: parent.right IconSvg { id: imageTemp - width: 24 - height: 24 anchors.top: parent.top - anchors.topMargin: 0 anchors.left: parent.left - anchors.leftMargin: 0 + width: 24 + height: 24 color: Theme.colorSubText - source: "qrc:/IconLibrary/material-symbols/sensors/airware.svg" + source: "qrc:/assets/gfx/icons/thermometer_big-24px.svg" + //source: "qrc:/IconLibrary/material-symbols/sensors/thermometer-fill.svg" } Text { anchors.left: imageTemp.right @@ -1645,18 +1566,14 @@ Grid { Item { height: 40 anchors.left: parent.left - anchors.leftMargin: 0 anchors.right: parent.right - anchors.rightMargin: 0 IconSvg { id: imageHygro2 - width: 24 - height: 24 anchors.top: parent.top - anchors.topMargin: 0 anchors.left: parent.left - anchors.leftMargin: 0 + width: 24 + height: 24 color: Theme.colorSubText source: "qrc:/IconLibrary/material-icons/duotone/water_mid.svg" @@ -1701,18 +1618,14 @@ Grid { id: itemLumi height: 64 anchors.left: parent.left - anchors.leftMargin: 0 anchors.right: parent.right - anchors.rightMargin: 0 IconSvg { id: imageLumi - width: 24 - height: 24 anchors.top: parent.top - anchors.topMargin: 0 anchors.left: parent.left - anchors.leftMargin: 0 + width: 24 + height: 24 color: Theme.colorText source: "qrc:/IconLibrary/material-icons/duotone/wb_sunny.svg" @@ -1804,18 +1717,14 @@ Grid { id: itemLumiMmol height: 64 anchors.left: parent.left - anchors.leftMargin: 0 anchors.right: parent.right - anchors.rightMargin: 0 IconSvg { id: imageLumiMmol - width: 24 - height: 24 anchors.top: parent.top - anchors.topMargin: 0 anchors.left: parent.left - anchors.leftMargin: 0 + width: 24 + height: 24 color: Theme.colorText source: "qrc:/IconLibrary/material-icons/duotone/wb_sunny.svg" diff --git a/qml/Settings.qml b/qml/Settings.qml index 7942adf3..7c8893e1 100644 --- a/qml/Settings.qml +++ b/qml/Settings.qml @@ -844,7 +844,7 @@ Loader { ListTitle { text: qsTr("Bluetooth") - source: "qrc:/IconLibrary/material-symbols/sensors/bluetooth.svg" + source: "qrc:/IconLibrary/material-symbols/bluetooth.svg" } //////// diff --git a/qml/Tutorial.qml b/qml/Tutorial.qml index d6c19000..b7763e11 100644 --- a/qml/Tutorial.qml +++ b/qml/Tutorial.qml @@ -274,7 +274,7 @@ Rectangle { font.pixelSize: singleColumn ? Theme.fontSizeContent : Theme.fontSizeContentBig } IconSvg { - width: tutorialPages.width * (tutorialPages.height > tutorialPages.width ? 0.66 : 0.3) + width: tutorialPages.width * (tutorialPages.height > tutorialPages.width ? 0.666 : 0.3) height: width*0.2 anchors.horizontalCenter: parent.horizontalCenter @@ -296,7 +296,7 @@ Rectangle { font.pixelSize: singleColumn ? Theme.fontSizeContent : Theme.fontSizeContentBig } IconSvg { - width: tutorialPages.width * (tutorialPages.height > tutorialPages.width ? 0.66 : 0.3) + width: tutorialPages.width * (tutorialPages.height > tutorialPages.width ? 0.666 : 0.3) height: width*0.1797 anchors.horizontalCenter: parent.horizontalCenter diff --git a/qml/components/AirQualityIndicator.qml b/qml/components/AirQualityIndicator.qml index 1dc73c74..fcfae9ca 100644 --- a/qml/components/AirQualityIndicator.qml +++ b/qml/components/AirQualityIndicator.qml @@ -35,6 +35,7 @@ Item { arcBegin: 0 arcEnd: ((indicatorAirQuality.limitMin/indicatorAirQuality.valueMax) * 270) - 1 arcOffset: 225 + arcColor: (Theme.currentTheme === Theme.THEME_PLANT ? Theme.colorLightGreen : Theme.colorGreen) arcOpacity: 1 } @@ -50,6 +51,7 @@ Item { arcBegin: ((indicatorAirQuality.limitMin/indicatorAirQuality.valueMax) * 270) + 1 arcEnd: ((indicatorAirQuality.limitMax/indicatorAirQuality.valueMax) * 270) - 1 arcOffset: 225 + arcColor: Theme.colorOrange arcOpacity: 1 } @@ -65,6 +67,7 @@ Item { arcBegin: ((indicatorAirQuality.limitMax/indicatorAirQuality.valueMax) * 270) + 1 arcEnd: 270 arcOffset: 225 + arcColor: Theme.colorRed arcOpacity: 1 } @@ -80,8 +83,10 @@ Item { arcOffset: 225 arcBegin: 0 arcEnd: 270 + arcWidth: isMobile ? 12 : 18 arcColor: indicatorAirQuality.color + arcCap: "round" background: true backgroundOpacity: 0.5 @@ -156,4 +161,6 @@ Item { font.bold: false } } + + //////////////////////////////////////////////////////////////////////////// } diff --git a/qml/components/LuxBox.qml b/qml/components/LuxBox.qml index 08c6d3f2..c1ab997d 100644 --- a/qml/components/LuxBox.qml +++ b/qml/components/LuxBox.qml @@ -9,8 +9,9 @@ Rectangle { implicitHeight: 20 radius: 2 + required property string text + color: "grey" - property string text: "" Text { anchors.fill: parent diff --git a/qml/components/PhBox.qml b/qml/components/PhBox.qml new file mode 100644 index 00000000..ca3960af --- /dev/null +++ b/qml/components/PhBox.qml @@ -0,0 +1,32 @@ +import QtQuick + +import ComponentLibrary + +Rectangle { + id: control + + implicitWidth: 64 + implicitHeight: 20 + radius: Theme.componentRadius + + required property string text + + color: { + if (control.text === "4") return "#ff914d" + if (control.text === "5") return "#ffbd59" + if (control.text === "6") return "#ffde59" + if (control.text === "7") return "#c9e265" + if (control.text === "8") return "#03989e" + if (control.text === "9") return "#2163bb" + return "grey" + } + + Text { + anchors.centerIn: parent + text: control.text + textFormat: Text.PlainText + color: "white" + font.bold: true + font.pixelSize: Theme.fontSizeContentVerySmall + } +} diff --git a/qml/components_js/UtilsDeviceSensors.js b/qml/components_js/UtilsDeviceSensors.js index d2a0d41a..97c8364c 100644 --- a/qml/components_js/UtilsDeviceSensors.js +++ b/qml/components_js/UtilsDeviceSensors.js @@ -280,7 +280,7 @@ function getDeviceCapabilityIcon(capabilityId) { } else if (capabilityId === DeviceUtils.DeviceUtils.DEVICE_CLOCK) { src = "qrc:/IconLibrary/material-icons/duotone/timer.svg" } else if (capabilityId === DeviceUtils.DeviceUtils.DEVICE_LED_STATUS) { - src = "qrc:/IconLibrary/material-icons/duotone/emoji_objects.svg" + src = "qrc:/IconLibrary/material-symbols/backlight_low.svg" } else if (capabilityId === DeviceUtils.DeviceUtils.DEVICE_LED_RGB) { src = "qrc:/IconLibrary/material-icons/duotone/emoji_objects.svg" } else if (capabilityId === DeviceUtils.DeviceUtils.DEVICE_BUTTONS) { @@ -372,7 +372,7 @@ function getDeviceSensorIcon(sensorId) { } else if (sensorId === DeviceUtils.DeviceUtils.SENSOR_SOIL_PH) { src = "qrc:/IconLibrary/material-symbols/sensors/tonality.svg" } else if (sensorId === DeviceUtils.DeviceUtils.SENSOR_TEMPERATURE) { - src = "qrc:/IconLibrary/material-symbols/sensors/airware.svg" + src = "qrc:/assets/gfx/icons/thermometer_big-24px.svg" } else if (sensorId === DeviceUtils.DeviceUtils.SENSOR_HUMIDITY) { src = "qrc:/IconLibrary/material-icons/duotone/water_full.svg" } else if (sensorId === DeviceUtils.DeviceUtils.SENSOR_PRESSURE) { @@ -400,11 +400,11 @@ function getDeviceSensorIcon(sensorId) { } else if (sensorId === DeviceUtils.DeviceUtils.SENSOR_O3) { src = "qrc:/IconLibrary/material-symbols/sensors/air.svg" } else if (sensorId === DeviceUtils.DeviceUtils.SENSOR_CO) { - src = "qrc:/IconLibrary/material-symbols/sensors/air.svg" + src = "qrc:/IconLibrary/material-symbols/sensors/detector_co.svg" } else if (sensorId === DeviceUtils.DeviceUtils.SENSOR_CO2) { - src = "qrc:/IconLibrary/material-symbols/sensors/air.svg" + src = "qrc:/IconLibrary/material-symbols/sensors/co2.svg" } else if (sensorId === DeviceUtils.DeviceUtils.SENSOR_eCO2) { - src = "qrc:/IconLibrary/material-symbols/sensors/air.svg" + src = "qrc:/IconLibrary/material-symbols/sensors/co2.svg" } else if (sensorId === DeviceUtils.DeviceUtils.SENSOR_NO2) { src = "qrc:/IconLibrary/material-symbols/sensors/air.svg" } else if (sensorId === DeviceUtils.DeviceUtils.SENSOR_SO2) { diff --git a/qml/popups/PopupCalibration.qml b/qml/popups/PopupCalibration.qml index 90695d43..a9934eb9 100644 --- a/qml/popups/PopupCalibration.qml +++ b/qml/popups/PopupCalibration.qml @@ -24,6 +24,14 @@ Popup { //////////////////////////////////////////////////////////////////////////// + enter: Transition { NumberAnimation { property: "opacity"; from: 0.5; to: 1.0; duration: 133; } } + //exit: Transition { NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; duration: 200; } } + + Overlay.modal: Rectangle { + color: "#000" + opacity: Theme.isLight ? 0.24 : 0.48 + } + background: Rectangle { color: Theme.colorBackground border.color: Theme.colorSeparator diff --git a/qml/popups/PopupDeleteDevice.qml b/qml/popups/PopupDeleteDevice.qml index 987da17c..d1b82902 100644 --- a/qml/popups/PopupDeleteDevice.qml +++ b/qml/popups/PopupDeleteDevice.qml @@ -26,6 +26,14 @@ Popup { //////////////////////////////////////////////////////////////////////////// + enter: Transition { NumberAnimation { property: "opacity"; from: 0.5; to: 1.0; duration: 133; } } + //exit: Transition { NumberAnimation { property: "opacity"; from: 1.0; to: 0.0; duration: 200; } } + + Overlay.modal: Rectangle { + color: "#000" + opacity: Theme.isLight ? 0.24 : 0.48 + } + background: Rectangle { color: Theme.colorBackground border.color: Theme.colorSeparator diff --git a/qml/popups/PopupMacAddress.qml b/qml/popups/PopupMacAddress.qml index ccf3e00b..9f5d32bd 100644 --- a/qml/popups/PopupMacAddress.qml +++ b/qml/popups/PopupMacAddress.qml @@ -39,7 +39,7 @@ Popup { Overlay.modal: Rectangle { color: "#000" - opacity: ThemeEngine.isLight ? 0.24 : 0.666 + opacity: ThemeEngine.isLight ? 0.24 : 0.48 } background: Rectangle { @@ -58,10 +58,11 @@ Popup { } layer.enabled: !singleColumn - layer.effect: MultiEffect { + layer.effect: MultiEffect { // shadow autoPaddingEnabled: true + blurMax: 48 shadowEnabled: true - shadowColor: ThemeEngine.isLight ? "#88000000" : "#aaffffff" + shadowColor: Theme.isLight ? "#aa000000" : "#cc000000" } } diff --git a/thirdparty/ComponentLibrary/controls/PageIndicatorThemed.qml b/thirdparty/ComponentLibrary/controls/PageIndicatorThemed.qml index 9fdb1db1..a60fca9d 100644 --- a/thirdparty/ComponentLibrary/controls/PageIndicatorThemed.qml +++ b/thirdparty/ComponentLibrary/controls/PageIndicatorThemed.qml @@ -20,11 +20,13 @@ T.PageIndicator { property color color: Theme.colorHeaderContent + property bool compact: true + //////////////// delegate: Rectangle { - implicitWidth: 12 - implicitHeight: 12 + implicitWidth: control.compact ? 12 : 24 + implicitHeight: control.compact ? 12 : 8 radius: (width / 2) color: control.color diff --git a/thirdparty/ComponentLibrary/generic/ProgressCircle.qml b/thirdparty/ComponentLibrary/generic/ProgressCircle.qml index b72423e4..7a9f4930 100644 --- a/thirdparty/ComponentLibrary/generic/ProgressCircle.qml +++ b/thirdparty/ComponentLibrary/generic/ProgressCircle.qml @@ -20,6 +20,7 @@ Item { property color arcColor: Theme.colorPrimary property real arcOpacity: 1 + property string arcCap: "butt" // "butt", "round", "square" // Qt.FlatCap, Qt.RoundCap, Qt.SquareCap property bool background: true // a full circle as a background of the arc property real backgroundOpacity: 1 @@ -105,7 +106,9 @@ Item { var start = Math.PI * ((control.arcBegin + control.arcOffset - 90) / 180) var end = Math.PI * ((control.arcEnd + control.arcOffset - 90) / 180) var end_value = Math.PI * ((control.arcValue + control.arcOffset - 90) / 180) + ctx.reset() + ctx.lineCap = control.arcCap // draw if (control.isPie) { @@ -143,4 +146,6 @@ Item { } } } + + //////////////////////////////////////////////////////////////////////////// } diff --git a/thirdparty/IconLibrary/IconLibrary.qrc b/thirdparty/IconLibrary/IconLibrary.qrc index b4fb2604..c79b7920 100644 --- a/thirdparty/IconLibrary/IconLibrary.qrc +++ b/thirdparty/IconLibrary/IconLibrary.qrc @@ -440,10 +440,6 @@ material-symbols/sensors/aq.svg material-symbols/sensors/aq_indoor.svg material-symbols/sensors/atm.svg - material-symbols/sensors/bluetooth.svg - material-symbols/sensors/bluetooth_connected.svg - material-symbols/sensors/bluetooth_disabled.svg - material-symbols/sensors/bluetooth_searching.svg material-symbols/sensors/bolt.svg material-symbols/sensors/bolt-fill.svg material-symbols/sensors/bubble_chart.svg @@ -497,7 +493,6 @@ material-symbols/sensors/salinity.svg material-symbols/sensors/salinity-fill.svg material-symbols/sensors/sensors.svg - material-symbols/sensors/settings_bluetooth.svg material-symbols/sensors/severe_cold.svg material-symbols/sensors/spo2.svg material-symbols/sensors/spo2-fill.svg @@ -610,6 +605,10 @@ material-symbols/barcode.svg material-symbols/barcode_scanner.svg material-symbols/block.svg + material-symbols/bluetooth.svg + material-symbols/bluetooth_connected.svg + material-symbols/bluetooth_disabled.svg + material-symbols/bluetooth_searching.svg material-symbols/bottom_panel_close-fill.svg material-symbols/bottom_panel_open-fill.svg material-symbols/bug_report.svg @@ -795,6 +794,7 @@ material-symbols/search.svg material-symbols/settings.svg material-symbols/settings_applications.svg + material-symbols/settings_bluetooth.svg material-symbols/settings-fill.svg material-symbols/share.svg material-symbols/share-fill.svg diff --git a/thirdparty/IconLibrary/material-symbols/sensors/bluetooth.svg b/thirdparty/IconLibrary/material-symbols/bluetooth.svg similarity index 100% rename from thirdparty/IconLibrary/material-symbols/sensors/bluetooth.svg rename to thirdparty/IconLibrary/material-symbols/bluetooth.svg diff --git a/thirdparty/IconLibrary/material-symbols/sensors/bluetooth_connected.svg b/thirdparty/IconLibrary/material-symbols/bluetooth_connected.svg similarity index 100% rename from thirdparty/IconLibrary/material-symbols/sensors/bluetooth_connected.svg rename to thirdparty/IconLibrary/material-symbols/bluetooth_connected.svg diff --git a/thirdparty/IconLibrary/material-symbols/sensors/bluetooth_disabled.svg b/thirdparty/IconLibrary/material-symbols/bluetooth_disabled.svg similarity index 100% rename from thirdparty/IconLibrary/material-symbols/sensors/bluetooth_disabled.svg rename to thirdparty/IconLibrary/material-symbols/bluetooth_disabled.svg diff --git a/thirdparty/IconLibrary/material-symbols/sensors/bluetooth_searching.svg b/thirdparty/IconLibrary/material-symbols/bluetooth_searching.svg similarity index 100% rename from thirdparty/IconLibrary/material-symbols/sensors/bluetooth_searching.svg rename to thirdparty/IconLibrary/material-symbols/bluetooth_searching.svg diff --git a/thirdparty/IconLibrary/material-symbols/sensors/settings_bluetooth.svg b/thirdparty/IconLibrary/material-symbols/settings_bluetooth.svg similarity index 100% rename from thirdparty/IconLibrary/material-symbols/sensors/settings_bluetooth.svg rename to thirdparty/IconLibrary/material-symbols/settings_bluetooth.svg