[ui] GraphEditor: highlight chunks with lighter/darker

This commit is contained in:
Fabien Castan 2024-08-20 19:37:03 +02:00
parent 40c2caac5d
commit 5c379c508c
2 changed files with 10 additions and 1 deletions

View file

@ -6,6 +6,7 @@ import Utils 1.0
ListView {
id: root
interactive: false
property bool highlightChunks: true
SystemPalette { id: activePalette }
@ -27,7 +28,14 @@ ListView {
height: root.chunkHeight
width: root.chunkWidth
property var chunkColor: Colors.getChunkColor(object, { "NONE": root.defaultColor })
color: index % 2 == 0 ? chunkColor : Qt.darker(chunkColor, 1.2)
color: {
if(!highlightChunks || model.count == 1)
return chunkColor
if(index % 2 == 0)
return Qt.lighter(chunkColor, 1.1)
else
return Qt.darker(chunkColor, 1.1)
}
}
}

View file

@ -1039,6 +1039,7 @@ ApplicationWindow {
Layout.fillWidth: true
height: 6
model: _reconstruction ? _reconstruction.sortedDFSChunks : null
highlightChunks: false
}
WorkspaceView {