[ui] do not display the value if it is not valid, not computed dynamic output attributes

This commit is contained in:
Candice Bentéjac 2024-07-19 10:53:47 +02:00
parent 438b84a8bc
commit bd74ee2829

View file

@ -193,6 +193,10 @@ RowLayout {
Layout.fillWidth: true
sourceComponent: {
if (attribute.value === undefined)
{
return notComputed_component
}
switch (attribute.type) {
case "PushButtonParam":
return pushButton_component
@ -220,6 +224,22 @@ RowLayout {
}
}
Component {
id: notComputed_component
Label {
anchors.fill: parent
text: MaterialIcons.do_not_disturb_alt
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
background: Rectangle {
anchors.fill: parent
border.width: 0
radius: 20
color: Qt.darker(palette.window, 1.1)
}
}
}
Component {
id: pushButton_component
Button {