[ui] GraphEditor: node status layout adjustments

This commit is contained in:
Fabien Castan 2020-01-27 17:57:14 +01:00
parent 2705c89130
commit 80e3afd9a9

View file

@ -55,10 +55,7 @@ FocusScope {
Component { Component {
id: statViewerComponent id: statViewerComponent
Item { Item {
id: statusViewer id: statusViewer
Layout.fillWidth: true
Layout.fillHeight: true
property url source: componentLoader.source property url source: componentLoader.source
property var lastModified: undefined property var lastModified: undefined
@ -120,26 +117,46 @@ FocusScope {
ListView { ListView {
id: statusListView id: statusListView
anchors.fill: parent anchors.fill: parent
// spacing: 3 spacing: 3
model: statusListModel model: statusListModel
delegate: Rectangle { delegate: Rectangle {
color: activePalette.window color: activePalette.window
width: childrenRect.width width: parent.width
height: childrenRect.height height: childrenRect.height
RowLayout { RowLayout {
Label { width: parent.width
text: key Rectangle {
padding: 4 id: statusKey
leftPadding: 6 anchors.margins: 2
// height: statusValue.height
color: Qt.darker(activePalette.window, 1.1)
Layout.preferredWidth: sizeHandle.x Layout.preferredWidth: sizeHandle.x
elide: Text.ElideRight Layout.minimumWidth: 10.0 * Qt.application.font.pixelSize
background: Rectangle { color: Qt.darker(activePalette.window, 1.1) } Layout.maximumWidth: 15.0 * Qt.application.font.pixelSize
Layout.fillWidth: false
Layout.fillHeight: true
Label {
text: key
anchors.fill: parent
anchors.top: parent.top
topPadding: 4
leftPadding: 6
verticalAlignment: TextEdit.AlignTop
elide: Text.ElideRight
}
} }
TextArea { TextArea {
id: statusValue
text: value text: value
anchors.margins: 2
Layout.fillWidth: true Layout.fillWidth: true
wrapMode: Label.WrapAtWordBoundaryOrAnywhere wrapMode: Label.WrapAtWordBoundaryOrAnywhere
textFormat: TextEdit.PlainText
readOnly: true
selectByMouse: true
background: Rectangle { anchors.fill: parent; color: Qt.darker(activePalette.window, 1.05) }
} }
} }
} }