mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-04-28 17:57:16 +02:00
[GraphEditor] Remove "common.js" and use Utils.Colors instead
This commit is contained in:
parent
6ee3b01177
commit
b7716ef1bd
3 changed files with 2 additions and 30 deletions
|
@ -2,7 +2,7 @@ import QtQuick
|
|||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
|
||||
import "common.js" as Common
|
||||
import Utils 1.0
|
||||
|
||||
/**
|
||||
* ChunkListView
|
||||
|
@ -86,7 +86,7 @@ ColumnLayout {
|
|||
Rectangle {
|
||||
width: 4
|
||||
height: parent.height
|
||||
color: Common.getChunkColor(parent.chunk)
|
||||
color: Colors.getChunkColor(parent.chunk)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,8 +4,6 @@ import QtQuick.Layouts
|
|||
|
||||
import Controls 1.0
|
||||
|
||||
import "common.js" as Common
|
||||
|
||||
/**
|
||||
* Displays Node documentation
|
||||
*/
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
var statusColors = {
|
||||
"NONE": "transparent",
|
||||
"SUBMITTED": "#009688",
|
||||
"RUNNING": "#FF9800",
|
||||
"ERROR": "#F44336",
|
||||
"SUCCESS": "#4CAF50",
|
||||
"STOPPED": "#E91E63"
|
||||
}
|
||||
|
||||
var statusColorsExternOverrides = {
|
||||
"SUBMITTED": "#2196F3"
|
||||
}
|
||||
|
||||
function getChunkColor(chunk, overrides) {
|
||||
if (overrides && chunk.statusName in overrides) {
|
||||
return overrides[chunk.statusName]
|
||||
} else if(chunk.execModeName === "EXTERN"
|
||||
&& chunk.statusName in statusColorsExternOverrides) {
|
||||
return statusColorsExternOverrides[chunk.statusName]
|
||||
} else if(chunk.statusName in statusColors) {
|
||||
return statusColors[chunk.statusName]
|
||||
}
|
||||
|
||||
console.warn("Unknown status : " + chunk.status)
|
||||
return "magenta"
|
||||
}
|
Loading…
Add table
Reference in a new issue