mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-06-06 12:02:24 +00:00
Switched to qmlformat.
This commit is contained in:
+12
-12
@@ -30,25 +30,25 @@ Item {
|
||||
layer.smooth: true
|
||||
|
||||
Component.onCompleted: {
|
||||
requestPaint()
|
||||
requestPaint();
|
||||
}
|
||||
|
||||
onPaint: {
|
||||
var ctx = getContext("2d")
|
||||
ctx.reset()
|
||||
var ctx = getContext("2d");
|
||||
ctx.reset();
|
||||
|
||||
var centerX = width / 2
|
||||
var centerY = height / 2
|
||||
var radius = Math.min(width, height) / 2 - strokeWidth / 2
|
||||
var centerX = width / 2;
|
||||
var centerY = height / 2;
|
||||
var radius = Math.min(width, height) / 2 - strokeWidth / 2;
|
||||
|
||||
ctx.strokeStyle = root.color
|
||||
ctx.lineWidth = Math.max(1, root.strokeWidth)
|
||||
ctx.lineCap = "round"
|
||||
ctx.strokeStyle = root.color;
|
||||
ctx.lineWidth = Math.max(1, root.strokeWidth);
|
||||
ctx.lineCap = "round";
|
||||
|
||||
// Draw arc with gap (270 degrees = 3/4 of circle)
|
||||
ctx.beginPath()
|
||||
ctx.arc(centerX, centerY, radius, -Math.PI / 2, -Math.PI / 2 + Math.PI * 1.5)
|
||||
ctx.stroke()
|
||||
ctx.beginPath();
|
||||
ctx.arc(centerX, centerY, radius, -Math.PI / 2, -Math.PI / 2 + Math.PI * 1.5);
|
||||
ctx.stroke();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user