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
+7 -7
View File
@@ -19,17 +19,17 @@ Item {
return;
if (!saturationSlider.pressed)
saturationSlider.value = drawing.penColor.hsvSaturation;
saturationSlider.value = drawing.drawingState.penColor.hsvSaturation;
if (!brightnessSlider.pressed)
brightnessSlider.value = drawing.penColor.hsvValue;
brightnessSlider.value = drawing.drawingState.penColor.hsvValue;
}
function updatePenColorFromHsv() {
if (!drawing)
return;
drawing.penColor = Qt.hsva(huePicker.currentHue, saturationSlider.value, brightnessSlider.value, drawing.penColor.a);
drawing.drawingState.penColor = Qt.hsva(huePicker.currentHue, saturationSlider.value, brightnessSlider.value, drawing.drawingState.penColor.a);
}
implicitHeight: column.height + Appearance.padding.larger * 2
@@ -42,7 +42,7 @@ Item {
root.syncFromPenColor();
}
target: root.drawing
target: root.drawing.drawingState
}
Column {
@@ -126,9 +126,9 @@ Item {
multiplier: 1
orientation: Qt.Horizontal
to: 45
value: root.drawing.penWidth
value: root.drawing.drawingState.penWidth
onMoved: root.drawing.penWidth = value
onMoved: root.drawing.drawingState.penWidth = value
}
}
@@ -146,6 +146,6 @@ Item {
shapeMorph: true
shapeMorphExpansion: pressed ? 12 : 0
onClicked: root.drawing.penColor = modelData
onClicked: root.drawing.drawingState.penColor = modelData
}
}
+2 -2
View File
@@ -44,7 +44,7 @@ Item {
Loader {
id: icon
active: root.shouldBeActive || root.visible
active: (root.shouldBeActive || root.visible) && opacity > 0
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
asynchronous: true
@@ -63,7 +63,7 @@ Item {
Loader {
id: content
active: root.shouldBeActive || root.visible
active: (root.shouldBeActive || root.visible) && opacity > 0
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
asynchronous: true