Skip to content

Commit

Permalink
Update components/dialogs and widgets to use interactive property
Browse files Browse the repository at this point in the history
Part of #1818
  • Loading branch information
MikeTrahearn-Qinetic committed Feb 7, 2025
1 parent b90f552 commit a107226
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 11 deletions.
4 changes: 2 additions & 2 deletions components/PageGensetModel.qml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ ObjectModel {
}

preferredVisible: _dataItem.isValid
enabled: secondaryText !== CommonWords.none_errors
interactive: secondaryText !== CommonWords.none_errors

onClicked: Global.notificationLayer.popAndGoToNotifications()

Expand Down Expand Up @@ -336,7 +336,7 @@ ObjectModel {
stepSize: 0.1
suffix: Units.defaultUnitString(VenusOS.Units_Volt_DC)
preferredVisible: dataItem.isValid
enabled: bmsControlled.dataItem.value === 0
interactive: dataItem.isValid && bmsControlled.dataItem.value === 0
}

ListText {
Expand Down
2 changes: 1 addition & 1 deletion components/dialogs/InverterChargerModeDialog.qml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ ModalDialog {

ListRadioButton {
flat: true
enabled: modelData.enabled !== false
interactive: modelData.enabled !== false
visible: modelData.visible !== false
checked: modelData.value === root.mode
text: root.showInverterModesOnly
Expand Down
10 changes: 2 additions & 8 deletions components/widgets/DcLoadsWidget.qml
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,13 @@ OverviewWidget {
Units.getCombinedDisplayText(VenusOS.Units_Watt, dcDevice.power),
]

onClicked: root._showSettingsPage(device)

DcDevice {
id: dcDevice
serviceUid: deviceDelegate.device.serviceUid
}

ListPressArea {
id: delegatePressArea

anchors.fill: parent.backgroundRect
radius: backgroundRect.radius
onClicked: root._showSettingsPage(device)
}

CP.ColorImage {
parent: deviceDelegate.content
anchors.verticalCenter: parent.verticalCenter
Expand Down

0 comments on commit a107226

Please sign in to comment.