[ui] Attribute: display icon on advanced parameters

This commit is contained in:
Yann Lanthony 2018-12-14 15:45:24 +01:00
parent 1c935b6b5a
commit dc8be1efae

View file

@ -20,13 +20,24 @@ RowLayout {
signal doubleClicked(var attr)
spacing: 4
spacing: 2
Pane {
background: Rectangle { color: Qt.darker(parent.palette.window, 1.1) }
padding: 0
Layout.preferredWidth: labelWidth || implicitWidth
Layout.fillHeight: true
RowLayout {
spacing: 0
width: parent.width
height: parent.height
Label {
id: parameterLabel
Layout.preferredWidth: labelWidth || implicitWidth
Layout.fillHeight: true
Layout.fillWidth: true
horizontalAlignment: attribute.isOutput ? Qt.AlignRight : Qt.AlignLeft
elide: Label.ElideRight
padding: 5
@ -45,7 +56,6 @@ RowLayout {
// make label italic if attribute is a link
font.italic: object.isLink
background: Rectangle { color: Qt.darker(parent.palette.window, 1.2) }
MouseArea {
id: parameterMA
@ -98,6 +108,15 @@ RowLayout {
}
}
}
MaterialLabel {
visible: attribute.desc.advanced
text: MaterialIcons.build
color: palette.mid
font.pointSize: 8
padding: 4
}
}
}
function setTextFieldAttribute(value)
{