Meshroom/meshroom/ui/qml/GraphEditor/NodeChunks.qml
Yann Lanthony 728ddeeca3 [ui] move NodeChunks color "logic" in a javascript file
centralize status-based color in a file accessible from outside NodeChunk component
2017-12-28 21:15:13 +01:00

24 lines
570 B
QML

import QtQuick 2.7
import "common.js" as Common
ListView {
id: root
interactive: false
SystemPalette { id: palette }
property color defaultColor: Qt.darker(palette.window, 1.1)
property real chunkHeight: height
property real chunkWidth: model ? width / model.count : 0
orientation: ListView.Horizontal
implicitWidth: 100
spacing: 0
delegate: Rectangle {
id: chunkDelegate
height: root.chunkHeight
width: root.chunkWidth
color: Common.getChunkColor(object, {"NONE": root.defaultColor})
}
}