From f38154b109fe90cb4f0f172cff8121503c73dcc9 Mon Sep 17 00:00:00 2001 From: Aurore LAFAURIE Date: Tue, 14 May 2024 18:13:41 +0200 Subject: [PATCH 1/2] [ui] Selected node header set to base color --- meshroom/ui/qml/GraphEditor/Node.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meshroom/ui/qml/GraphEditor/Node.qml b/meshroom/ui/qml/GraphEditor/Node.qml index e7bd64a9..fe6e3b37 100755 --- a/meshroom/ui/qml/GraphEditor/Node.qml +++ b/meshroom/ui/qml/GraphEditor/Node.qml @@ -149,7 +149,7 @@ Item { Rectangle { anchors.fill: nodeContent anchors.margins: -border.width - visible: root.mainSelected || root.hovered + visible: root.mainSelected || root.hovered || root.selected border.width: 2.5 border.color: root.mainSelected ? activePalette.highlight : Qt.darker(activePalette.highlight, 1.5) opacity: 0.9 @@ -183,7 +183,7 @@ Item { id: header width: parent.width height: headerLayout.height - color: root.mainSelected ? activePalette.highlight : root.selected ? Qt.darker(activePalette.highlight, 1.1): root.baseColor + color: root.baseColor radius: background.radius // Fill header's bottom radius From 8c242cbbecd4cc8edfb9ec8176058bb764c30890 Mon Sep 17 00:00:00 2001 From: Fabien Castan Date: Wed, 22 May 2024 21:34:33 +0200 Subject: [PATCH 2/2] [ui] GraphEditor: update color/width of node's border Avoid ambiguities between mainSelected/selected/hover. --- meshroom/ui/qml/GraphEditor/Node.qml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/meshroom/ui/qml/GraphEditor/Node.qml b/meshroom/ui/qml/GraphEditor/Node.qml index fe6e3b37..917fca2b 100755 --- a/meshroom/ui/qml/GraphEditor/Node.qml +++ b/meshroom/ui/qml/GraphEditor/Node.qml @@ -150,8 +150,20 @@ Item { anchors.fill: nodeContent anchors.margins: -border.width visible: root.mainSelected || root.hovered || root.selected - border.width: 2.5 - border.color: root.mainSelected ? activePalette.highlight : Qt.darker(activePalette.highlight, 1.5) + border.width: { + if(root.mainSelected) + return 3 + if(root.selected) + return 2.5 + return 2 + } + border.color: { + if(root.mainSelected) + return activePalette.highlight + if(root.selected) + return Qt.darker(activePalette.highlight, 1.2) + return Qt.lighter(activePalette.base, 3) + } opacity: 0.9 radius: background.radius + border.width color: "transparent"