mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-04 01:08:26 +02:00
[ui] Edge: fix control points distance
Avoid getting increasingly distorted curves with edge width.
This commit is contained in:
parent
61866708ac
commit
efb8e1ed67
1 changed files with 2 additions and 3 deletions
|
@ -46,8 +46,7 @@ Shape {
|
|||
|
||||
PathCubic {
|
||||
id: cubic
|
||||
property real curveScale: 0.7
|
||||
property real ctrlPtDist: Math.abs(root.width * curveScale)
|
||||
property real ctrlPtDist: 30
|
||||
x: root.endX
|
||||
y: root.endY
|
||||
relativeControl1X: ctrlPtDist; relativeControl1Y: 0
|
||||
|
@ -58,7 +57,7 @@ Shape {
|
|||
EdgeMouseArea {
|
||||
id: edgeArea
|
||||
anchors.fill: parent
|
||||
curveScale: cubic.curveScale
|
||||
curveScale: cubic.ctrlPtDist / root.width // normalize by width
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
thickness: root.thickness + 4
|
||||
onPressed: root.pressed(arguments[0]) // can't get named args, use arguments array
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue