mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 01:00:44 +02:00
Ensure mask covers non-circular emoji
This commit is contained in:
parent
9ae5eba12a
commit
0497c10d69
1 changed files with 5 additions and 1 deletions
|
@ -71,7 +71,9 @@ Item {
|
||||||
ctx.beginPath()
|
ctx.beginPath()
|
||||||
ctx.fillStyle = root.colorCircle
|
ctx.fillStyle = root.colorCircle
|
||||||
ctx.moveTo(x, y)
|
ctx.moveTo(x, y)
|
||||||
ctx.arc(x, y, width / 2, start, end, false)
|
// Using `width` instead of `width/2` as the argument here ensures
|
||||||
|
// that the ProgressCircle mask will cover the entirety of non-circular emoji.
|
||||||
|
ctx.arc(x, y, width, start, end, false)
|
||||||
ctx.lineTo(x, y)
|
ctx.lineTo(x, y)
|
||||||
ctx.fill()
|
ctx.fill()
|
||||||
} else {
|
} else {
|
||||||
|
@ -88,6 +90,8 @@ Item {
|
||||||
ctx.strokeStyle = root.colorCircle
|
ctx.strokeStyle = root.colorCircle
|
||||||
ctx.stroke()
|
ctx.stroke()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ctx.scale(0.1, 0.2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in a new issue