// An outline drawn as four opaque strips rather than a Rectangle border. // // A rounded Rectangle with a translucent fill and a border renders holes at the // corners on this Qt build (QTBUG-137166), and every outline in the capture // overlay sits on top of a photo where that would be very visible. Four plain // strips have no corners to get wrong. import QtQuick import qs.config Item { id: root property color strokeColor: Theme.accent property int strokeWidth: 2 // Optional wash over the enclosed area, drawn under the strips. property color fillColor: "transparent" Rectangle { anchors.fill: parent color: root.fillColor border.width: 0 } Rectangle { anchors { left: parent.left; right: parent.right; top: parent.top } height: root.strokeWidth color: root.strokeColor border.width: 0 } Rectangle { anchors { left: parent.left; right: parent.right; bottom: parent.bottom } height: root.strokeWidth color: root.strokeColor border.width: 0 } Rectangle { anchors { top: parent.top; bottom: parent.bottom; left: parent.left } width: root.strokeWidth color: root.strokeColor border.width: 0 } Rectangle { anchors { top: parent.top; bottom: parent.bottom; right: parent.right } width: root.strokeWidth color: root.strokeColor border.width: 0 } }