fixes for drawing
Lint & Format (JS/TS) / lint-format (pull_request) Successful in 9s
Python / lint-format (pull_request) Successful in 14s
Python / test (pull_request) Successful in 29s
Lint & Format (Rust) / lint-format (pull_request) Successful in 1m8s

This commit is contained in:
2026-06-20 14:23:15 +02:00
parent a1c148bf70
commit 81eb56e1d0
7 changed files with 56 additions and 39 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ CustomRect {
id: stateLayer
color: root.internalChecked ? root.activeOnColor : root.inactiveOnColor
enabled: enabled
enabled: root.enabled
onClicked: {
if (root.isToggle)
+5 -5
View File
@@ -45,10 +45,10 @@ Item {
}
function syncFromPenColor() {
if (!drawing)
if (!drawing.drawingState)
return;
const c = drawing.penColor;
const c = drawing.drawingState.penColor;
if (c.hsvSaturation > 0) {
currentHue = c.hsvHue;
@@ -85,7 +85,7 @@ Item {
currentHue = relative / arcSweep;
lastChromaticHue = currentHue;
drawing.penColor = Qt.hsva(currentHue, drawing.penColor.hsvSaturation, drawing.penColor.hsvValue, drawing.penColor.a);
drawing.drawingState.penColor = Qt.hsva(currentHue, drawing.drawingState.penColor.hsvSaturation, drawing.drawingState.penColor.hsvValue, drawing.drawingState.penColor.a);
}
implicitHeight: 180
@@ -111,7 +111,7 @@ Item {
root.syncFromPenColor();
}
target: root.drawing
target: root.drawing.drawingState
}
Canvas {
@@ -151,7 +151,7 @@ Item {
CustomRect {
anchors.centerIn: parent
color: root.drawing?.penColor
color: root.drawing?.drawingState.penColor
implicitHeight: implicitWidth
implicitWidth: canvas.height - root.handleSize - Appearance.padding.extraLarge * 2
radius: Appearance.rounding.full