From 181ece92440ad5ce2c76d1c14687e6394d3a0d13 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Wed, 30 Nov 2022 12:32:37 -0600 Subject: [PATCH] removing the canvas and trying a shape --- src/qml/presenter/ServiceList.qml | 106 +++++++++++++++--------------- 1 file changed, 54 insertions(+), 52 deletions(-) diff --git a/src/qml/presenter/ServiceList.qml b/src/qml/presenter/ServiceList.qml index be91c47..cbd5332 100644 --- a/src/qml/presenter/ServiceList.qml +++ b/src/qml/presenter/ServiceList.qml @@ -371,64 +371,66 @@ Item { visible: false Component.onCompleted: dragHighlightLine = dropHighlightLine } - Canvas { - /* asynchronous: true; */ - x: dropHighlightLine.width - 8 - y: dropHighlightLine.y - 17 - z: 1 - width: 100; height: 100; - contextType: "2d" - onPaint: { - var ctx = getContext("2d"); - ctx.fillStyle = Kirigami.Theme.hoverColor; - ctx.rotate(30); - ctx.transform(0.8, 0, 0, 0.8, 0, 30) - ctx.path = tearDropPath; - ctx.fill(); - } - visible: dropHighlightLine.visible - } - Path { - id: tearDropPath - startX: dropHighlightLine.width - startY: dropHighlightLine.y + 4 - PathSvg { - path: "M15 3 - Q16.5 6.8 25 18 - A12.8 12.8 0 1 1 5 18 - Q13.5 6.8 15 3z" - } - } - - /* Shape { */ + /* Canvas { */ + /* /\* asynchronous: true; *\/ */ /* x: dropHighlightLine.width - 8 */ /* y: dropHighlightLine.y - 17 */ /* z: 1 */ /* width: 100; height: 100; */ - - /* ShapePath { */ - /* fillColor: Kirigami.Theme.hoverColor */ - /* startX: 0; startY: 0 */ - /* PathLine { x: 180; y: 130 } */ - /* PathLine { x: 20; y: 130 } */ - /* PathLine { x: 20; y: 20 } */ - /* PathArc { */ - /* x: 40; y: 200; */ - /* radiusX: 200; */ - /* radiusY: 200; */ - /* useLargeArc: true */ - /* } */ - /* PathLine { x: 40; y: 120 } */ - /* PathArc { */ - /* x: -40; y: 120; */ - /* radiusX: 120; */ - /* radiusY: 120; */ - /* useLargeArc: true; */ - /* direction: PathArc.Counterclockwise */ - /* } */ - /* PathLine { x: -40; y: 200 } */ + /* contextType: "2d" */ + /* renderStrategy: Canvas.Threaded */ + /* onPaint: { */ + /* var ctx = getContext("2d"); */ + /* ctx.fillRule = Qt.OddEvenFill */ + /* ctx.fillStyle = Kirigami.Theme.hoverColor.name(); */ + /* ctx.rotate(30); */ + /* ctx.transform(0.8, 0, 0, 0.8, 0, 30) */ + /* ctx.path = tearDropPath; */ + /* ctx.fill(); */ + /* } */ + /* visible: dropHighlightLine.visible */ + /* } */ + /* Path { */ + /* id: tearDropPath */ + /* startX: dropHighlightLine.width */ + /* startY: dropHighlightLine.y + 4 */ + /* PathSvg { */ + /* path: "M15 3 */ + /* Q16.5 6.8 25 18 */ + /* A12.8 12.8 0 1 1 5 18 */ + /* Q13.5 6.8 15 3z" */ /* } */ /* } */ + + Shape { + x: dropHighlightLine.width - 8 + y: dropHighlightLine.y - 17 + z: 1 + width: 100; height: 100; + + ShapePath { + fillColor: Kirigami.Theme.hoverColor + startX: 0; startY: 0 + PathLine { x: 180; y: 130 } + PathLine { x: 20; y: 130 } + PathLine { x: 20; y: 20 } + PathArc { + x: 40; y: 200; + radiusX: 200; + radiusY: 200; + useLargeArc: true + } + PathLine { x: 40; y: 120 } + PathArc { + x: -40; y: 120; + radiusX: 120; + radiusY: 120; + useLargeArc: true; + direction: PathArc.Counterclockwise + } + PathLine { x: -40; y: 200 } + } + } } Kirigami.ActionToolBar {