fix listitem icons after merge conflict
This commit is contained in:
parent
fa2030dfef
commit
be1c03d77e
@ -12,11 +12,10 @@ SwipeDelegate {
|
|||||||
property string iconName
|
property string iconName
|
||||||
property int iconSize: app.iconSize
|
property int iconSize: app.iconSize
|
||||||
property color iconColor: app.guhAccent
|
property color iconColor: app.guhAccent
|
||||||
property string secondaryIconName
|
property alias secondaryIconName: secondaryIcon.name
|
||||||
property alias secondaryIconColor: secondaryIcon.color
|
property alias secondaryIconColor: secondaryIcon.color
|
||||||
|
property alias tertiaryIconName: tertiaryIcon.name
|
||||||
property bool batteryCritical: false
|
property alias tertiaryIconColor: tertiaryIcon.color
|
||||||
property bool disconnected: false
|
|
||||||
|
|
||||||
signal deleteClicked()
|
signal deleteClicked()
|
||||||
|
|
||||||
@ -56,28 +55,26 @@ SwipeDelegate {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ColorIcon {
|
|
||||||
Layout.preferredHeight: app.iconSize * .5
|
|
||||||
Layout.preferredWidth: height
|
|
||||||
name: "../images/battery/battery-010.svg"
|
|
||||||
visible: root.batteryCritical
|
|
||||||
}
|
|
||||||
|
|
||||||
ColorIcon {
|
|
||||||
Layout.preferredHeight: app.iconSize * .5
|
|
||||||
Layout.preferredWidth: height
|
|
||||||
name: "../images/dialog-warning-symbolic.svg"
|
|
||||||
visible: root.disconnected
|
|
||||||
color: "red"
|
|
||||||
}
|
|
||||||
|
|
||||||
ColorIcon {
|
ColorIcon {
|
||||||
id: secondaryIcon
|
id: secondaryIcon
|
||||||
|
Layout.preferredHeight: app.iconSize * .5
|
||||||
|
Layout.preferredWidth: height
|
||||||
|
visible: name.length > 0
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorIcon {
|
||||||
|
id: tertiaryIcon
|
||||||
|
Layout.preferredHeight: app.iconSize * .5
|
||||||
|
Layout.preferredWidth: height
|
||||||
|
visible: name.length > 0
|
||||||
|
}
|
||||||
|
|
||||||
|
ColorIcon {
|
||||||
|
id: progressionIcon
|
||||||
Layout.preferredHeight: app.iconSize * .6
|
Layout.preferredHeight: app.iconSize * .6
|
||||||
Layout.preferredWidth: height
|
Layout.preferredWidth: height
|
||||||
name: root.secondaryIconName.length > 0 ? root.secondaryIconName : "../images/next.svg"
|
name: "../images/next.svg"
|
||||||
visible: root.progressive
|
visible: root.progressive
|
||||||
color: root.secondaryIconColor
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -10,11 +10,14 @@ MeaListItemDelegate {
|
|||||||
iconName: deviceClass ? app.interfacesToIcon(deviceClass.interfaces) : ""
|
iconName: deviceClass ? app.interfacesToIcon(deviceClass.interfaces) : ""
|
||||||
text: device.name
|
text: device.name
|
||||||
progressive: true
|
progressive: true
|
||||||
property bool batteryCritical: deviceClass && deviceClass.interfaces.indexOf("battery") >= 0 ? device.stateValue(deviceClass.stateTypes.findByName("batteryCritical").id) === true : false
|
secondaryIconName: batteryCritical ? "../images/battery/battery-010.svg" : ""
|
||||||
property bool disconnected: deviceClass && deviceClass.interfaces.indexOf("connectable") >= 0 ? device.stateValue(deviceClass.stateTypes.findByName("connected").id) === false : false
|
tertiaryIconName: disconnected ? "../images/dialog-warning-symbolic.svg" : ""
|
||||||
|
tertiaryIconColor: "red"
|
||||||
|
|
||||||
property var device: null
|
property var device: null
|
||||||
|
|
||||||
readonly property var deviceClass: device ? Engine.deviceManager.deviceClasses.getDeviceClass(device.deviceClassId) : null
|
readonly property var deviceClass: device ? Engine.deviceManager.deviceClasses.getDeviceClass(device.deviceClassId) : null
|
||||||
|
readonly property bool batteryCritical: deviceClass && deviceClass.interfaces.indexOf("battery") >= 0 ? device.stateValue(deviceClass.stateTypes.findByName("batteryCritical").id) === true : false
|
||||||
|
readonly property bool disconnected: deviceClass && deviceClass.interfaces.indexOf("connectable") >= 0 ? device.stateValue(deviceClass.stateTypes.findByName("connected").id) === false : false
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user