Skip to content

Commit

Permalink
Various fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
emericg committed Apr 16, 2024
1 parent d2b4571 commit 9af0705
Show file tree
Hide file tree
Showing 10 changed files with 94 additions and 67 deletions.
57 changes: 30 additions & 27 deletions qml/About.qml
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ Loader {
ListItem { // description
width: parent.width
text: qsTr("A plant monitoring application that reads and plots data from compatible Bluetooth sensors and thermometers like Xiaomi 'Flower Care' or Parrot 'Flower Power'.")
source: "qrc:/assets/icons/material-symbols/info-fill.svg"
source: "qrc:/assets/icons/material-symbols/info.svg"
}

IconSvg { // image devices
Expand Down Expand Up @@ -242,57 +242,58 @@ Loader {
}
}

ListItemClickable { // tutorial
ListItemClickable { // release notes
width: parent.width

text: qsTr("Open the tutorial")
source: "qrc:/assets/icons/material-symbols/import_contacts-fill.svg"
text: qsTr("Release notes")
source: "qrc:/assets/icons/material-symbols/new_releases.svg"
sourceSize: 28
indicatorSource: "qrc:/assets/icons/material-symbols/chevron_right.svg"
indicatorSource: "qrc:/assets/icons/material-icons/duotone/launch.svg"

onClicked: screenTutorial.loadScreenFrom("About")
onClicked: Qt.openUrlExternally("https://github.com/emericg/WatchFlower/releases")
}

////////

ListSeparator { visible: (Qt.platform.os === "android" || Qt.platform.os === "ios") }

ListItemClickable { // permissions
ListItemClickable { // supported sensors
width: parent.width
visible: (Qt.platform.os === "android" || Qt.platform.os === "ios")

text: qsTr("About app permissions")
source: "qrc:/assets/icons/material-symbols/flaky.svg"
sourceSize: 24
indicatorSource: "qrc:/assets/icons/material-symbols/chevron_right.svg"
text: qsTr("Supported sensors")
source: "qrc:/assets/icons/material-symbols/check_circle.svg"
sourceSize: 28
indicatorSource: "qrc:/assets/icons/material-icons/duotone/launch.svg"

onClicked: screenAboutPermissions.loadScreenFrom("About")
onClicked: Qt.openUrlExternally("https://github.com/emericg/WatchFlower/blob/master/docs/README.md")
}

////////

ListSeparator { }

ListItemClickable { // release notes
ListItemClickable { // tutorial
width: parent.width

text: qsTr("Release notes")
source: "qrc:/assets/icons/material-symbols/new_releases.svg"
text: qsTr("Open the tutorial")
source: "qrc:/assets/icons/material-symbols/import_contacts-fill.svg"
sourceSize: 24
indicatorSource: "qrc:/assets/icons/material-icons/duotone/launch.svg"
indicatorSource: "qrc:/assets/icons/material-symbols/chevron_right.svg"

onClicked: Qt.openUrlExternally("https://github.com/emericg/WatchFlower/releases")
onClicked: screenTutorial.loadScreenFrom("About")
}

ListSeparator { }
////////

ListItemClickable { // supported sensors
ListSeparator { visible: (Qt.platform.os === "android" || Qt.platform.os === "ios") }

ListItemClickable { // permissions
width: parent.width
visible: (Qt.platform.os === "android" || Qt.platform.os === "ios")

text: qsTr("Supported sensors")
source: "qrc:/assets/icons/material-symbols/check_circle.svg"
text: qsTr("About app permissions")
source: "qrc:/assets/icons/material-symbols/flaky.svg"
sourceSize: 24
indicatorSource: "qrc:/assets/icons/material-icons/duotone/launch.svg"
indicatorSource: "qrc:/assets/icons/material-symbols/chevron_right.svg"

onClicked: Qt.openUrlExternally("https://github.com/emericg/WatchFlower/blob/master/docs/README.md")
onClicked: screenAboutPermissions.loadScreenFrom("About")
}

ListSeparator { }
Expand Down Expand Up @@ -434,6 +435,8 @@ Loader {
}
}

ListSeparator { }

////////
}
}
Expand Down
2 changes: 1 addition & 1 deletion qml/DeviceEnvironmental.qml
Original file line number Diff line number Diff line change
Expand Up @@ -1100,7 +1100,7 @@ Loader {

title: qsTr("Temperature")
legend: "°" + settingsManager.tempUnit
icon: "qrc:/assets/gfx/icons/thermometer.svg"
icon: "qrc:/assets/gfx/icons/thermometer-24px.svg"
value: currentDevice.temperature
precision: 1
onSensorSelection: primary = "hygrometer"
Expand Down
24 changes: 12 additions & 12 deletions qml/DevicePlantSensorCare.qml
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ Item {
anchors.verticalCenter: parent.verticalCenter
spacing: Theme.componentMargin

ButtonWireframe {
ButtonClear {
width: 100
height: isPhone ? 32 : 36

//fullColor: (plantInfos.visible)
//primaryColor: Theme.colorPrimary
//secondaryColor: Theme.colorBackground
color: Theme.colorPrimary
colorBackground: plantInfos.visible ? color : Qt.rgba(color.r, color.g, color.b, 0.2)
colorText: plantInfos.visible ? "white" : color

text: qsTr("Plant")
onClicked: {
Expand All @@ -137,13 +137,13 @@ Item {
}
}

ButtonWireframe {
ButtonClear {
width: 100
height: isPhone ? 32 : 36

//fullColor: (plantLimits.visible)
//primaryColor: Theme.colorPrimary
//secondaryColor: Theme.colorBackground
color: Theme.colorPrimary
colorBackground: plantLimits.visible ? color : Qt.rgba(color.r, color.g, color.b, 0.2)
colorText: plantLimits.visible ? "white" : color

text: qsTr("Limits")
onClicked: {
Expand All @@ -153,13 +153,13 @@ Item {
}
}

ButtonWireframe {
ButtonClear {
width: 100
height: isPhone ? 32 : 36

//fullColor: (plantJournal.visible)
//primaryColor: Theme.colorPrimary
//secondaryColor: Theme.colorBackground
color: Theme.colorPrimary
colorBackground: plantJournal.visible ? color : Qt.rgba(color.r, color.g, color.b, 0.2)
colorText: plantJournal.visible ? "white" : color

text: qsTr("Journal")
onClicked: {
Expand Down
24 changes: 12 additions & 12 deletions qml/DevicePlantSensorHistory.qml
Original file line number Diff line number Diff line change
Expand Up @@ -282,13 +282,13 @@ Item {
anchors.verticalCenter: parent.verticalCenter
spacing: Theme.componentMargin

ButtonWireframe {
ButtonClear {
width: 100
height: isPhone ? 32 : 36

//fullColor: (settingsManager.graphHistory === "monthly")
//primaryColor: Theme.colorPrimary
//secondaryColor: Theme.colorBackground
color: Theme.colorPrimary
colorBackground: (settingsManager.graphHistory === "monthly") ? color : Qt.rgba(color.r, color.g, color.b, 0.2)
colorText: (settingsManager.graphHistory === "monthly") ? "white" : color

text: qsTr("Month")
onClicked: {
Expand All @@ -301,13 +301,13 @@ Item {
}
}

ButtonWireframe {
ButtonClear {
width: 100
height: isPhone ? 32 : 36

//fullColor: (settingsManager.graphHistory === "weekly")
//primaryColor: Theme.colorPrimary
//secondaryColor: Theme.colorBackground
color: Theme.colorPrimary
colorBackground: (settingsManager.graphHistory === "weekly") ? color : Qt.rgba(color.r, color.g, color.b, 0.2)
colorText: (settingsManager.graphHistory === "weekly") ? "white" : color

text: qsTr("Week")
onClicked: {
Expand All @@ -320,13 +320,13 @@ Item {
}
}

ButtonWireframe {
ButtonClear {
width: 100
height: isPhone ? 32 : 36

//fullColor: (settingsManager.graphHistory === "daily")
//primaryColor: Theme.colorPrimary
//secondaryColor: Theme.colorBackground
color: Theme.colorPrimary
colorBackground: (settingsManager.graphHistory === "daily") ? color : Qt.rgba(color.r, color.g, color.b, 0.2)
colorText: (settingsManager.graphHistory === "daily") ? "white" : color

text: qsTr("Day")
onClicked: {
Expand Down
6 changes: 3 additions & 3 deletions qml/MobileDrawer.qml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ DrawerThemed {
DrawerItem {
highlighted: (appContent.state === "Settings" || appContent.state === "SettingsAdvanced")
text: qsTr("Settings")
source: "qrc:/assets/icons/material-symbols/settings.svg"
source: "qrc:/assets/icons/material-icons/duotone/tune.svg"

onClicked: {
screenSettings.loadScreen()
Expand All @@ -109,7 +109,7 @@ DrawerThemed {
DrawerItem {
highlighted: (appContent.state === "About" || appContent.state === "AboutPermissions")
text: qsTr("About")
source: "qrc:/assets/icons/material-symbols/info-fill.svg"
source: "qrc:/assets/icons/material-icons/duotone/info.svg"

onClicked: {
screenAbout.loadScreen()
Expand Down Expand Up @@ -201,7 +201,7 @@ DrawerThemed {
DrawerButton {
text: qsTr("Sync sensors history")

source: "qrc:/assets/gfx/icons/duotone-date_all-24px.svg"
source: "qrc:/assets/icons/material-symbols/merge_type.svg"
iconAnimation: "fade"
iconAnimated: deviceManager.syncing

Expand Down
23 changes: 23 additions & 0 deletions qml/components/ActionMenuFixed.qml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,29 @@ T.Popup {

////////

ActionMenuItem {
id: actionClose
width: parent.width

index: -1
text: qsTr("Close")
source: "qrc:/assets/icons/material-symbols/close.svg"
layoutDirection: actionMenu.layoutDirection
opacity: 0.8

onClicked: {
close()
}
}

ListSeparatorPadded {
anchors.leftMargin: Theme.componentMargin
anchors.rightMargin: Theme.componentMargin
height: 9
}

////////

ActionMenuItem {
id: actionUpdate
width: parent.width
Expand Down
3 changes: 2 additions & 1 deletion qml/components/AirQualityIndicator.qml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ Item {
color: indicatorAirQuality.color
smooth: true
opacity: 0.6
source: "qrc:/assets/icons_fontawesome/lungs-solid.svg"
source: "qrc:/assets/icons/fontawesome/lungs-solid.svg"
//source: "qrc:/assets/icons/material-symbols/sensors/pulmonology.svg"

property real minOpacity: 0.4
property real maxOpacity: 0.85
Expand Down
2 changes: 1 addition & 1 deletion qml/popups/PopupBackgroundUpdates.qml
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Popup {
height: 64
anchors.horizontalCenter: parent.horizontalCenter

source: "qrc:/assets/icons/material-symbols/battery_alert.svg"
source: "qrc:/assets/icons/material-icons/duotone/battery_alert.svg"
color: Theme.colorText
}

Expand Down
18 changes: 9 additions & 9 deletions qml/widgets/SunAndMoonWidget.qml
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@ Item {
}
*/
source: {
if (sunAndMoon.moonphaseName === "New") return "qrc:/assets/gfx/icons/moon_1.svg"
if (sunAndMoon.moonphaseName === "Evening Crescent") return "qrc:/assets/gfx/icons/moon_2.svg"
if (sunAndMoon.moonphaseName === "First Quarter") return "qrc:/assets/gfx/icons/moon_3.svg"
if (sunAndMoon.moonphaseName === "Waxing Gibbous") return "qrc:/assets/gfx/icons/moon_3.svg"
if (sunAndMoon.moonphaseName === "Full") return "qrc:/assets/gfx/icons/moon_4.svg"
if (sunAndMoon.moonphaseName === "Waning Gibbous") return "qrc:/assets/gfx/icons/moon_3.svg"
if (sunAndMoon.moonphaseName === "Last Quarter") return "qrc:/assets/gfx/icons/moon_3.svg"
if (sunAndMoon.moonphaseName === "Morning Crescent") return "qrc:/assets/gfx/icons/moon_2.svg"
if (sunAndMoon.moonphaseName === "New") return "qrc:/assets/icons/material-symbols/weather/brightness_1-fill.svg"
if (sunAndMoon.moonphaseName === "Evening Crescent") return "qrc:/assets/icons/material-symbols/weather/brightness_3.svg"
if (sunAndMoon.moonphaseName === "First Quarter") return "qrc:/assets/icons/material-symbols/weather/brightness_2.svg"
if (sunAndMoon.moonphaseName === "Waxing Gibbous") return "qrc:/assets/icons/material-symbols/weather/brightness_2.svg"
if (sunAndMoon.moonphaseName === "Full") return "qrc:/assets/icons/material-symbols/weather/brightness_1.svg"
if (sunAndMoon.moonphaseName === "Waning Gibbous") return "qrc:/assets/icons/material-symbols/weather/brightness_2.svg"
if (sunAndMoon.moonphaseName === "Last Quarter") return "qrc:/assets/icons/material-symbols/weather/brightness_3.svg"
if (sunAndMoon.moonphaseName === "Morning Crescent") return "qrc:/assets/icons/material-symbols/weather/brightness_2.svg"
}
color: Theme.colorIcon
}
Expand Down Expand Up @@ -258,7 +258,7 @@ Item {
IconSvg {
width: 40
height: 40
source: "qrc:/assets/icons/material-symbols/weather/brightness_5.svg"
source: "qrc:/assets/icons/material-symbols/weather/sunny.svg"
color: Theme.colorIcon
}
Column {
Expand Down
2 changes: 1 addition & 1 deletion src/NotificationManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class NotificationManager : public QObject
bool hasPermissionOS() const { return m_permOS; }

#if defined(Q_OS_IOS)
UtilsIOSNotifications m_iosnotifier;
//UtilsIOSNotifications m_iosnotifier;
#endif

// Singleton
Expand Down

0 comments on commit 9af0705

Please sign in to comment.