preset color buttons rework + curve smoothing
This commit is contained in:
@@ -123,7 +123,7 @@ Item {
|
||||
property bool setInitialPoint: false
|
||||
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
enabled: root.visibilities.isDrawing
|
||||
enabled: root.visibilities.isDrawing && !root.inLeftPanel(root.panels.drawing, hoverHandler.point.position.x, hoverHandler.point.position.y)
|
||||
grabPermissions: PointerHandler.CanTakeOverFromAnything | PointerHandler.TakeOverForbidden
|
||||
|
||||
onActiveChanged: {
|
||||
@@ -135,15 +135,15 @@ Item {
|
||||
}
|
||||
}
|
||||
onPointChanged: {
|
||||
if (point.pressedButtons & Qt.RightButton) {
|
||||
root.drawing.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
const x = point.position.x;
|
||||
const y = point.position.y;
|
||||
const origX = point.pressPosition.x;
|
||||
const origY = point.pressPosition.y;
|
||||
|
||||
if (point.pressedButtons & Qt.RightButton) {
|
||||
root.drawing.clear();
|
||||
return;
|
||||
}
|
||||
if (x === 0 && y === 0 && origX === 0 && origY === 0)
|
||||
return;
|
||||
|
||||
|
||||
@@ -370,6 +370,33 @@ CustomWindow {
|
||||
|
||||
sourceComponent: Drawing {
|
||||
id: drawing
|
||||
|
||||
layer.enabled: true
|
||||
|
||||
layer.effect: MultiEffect {
|
||||
maskEnabled: true
|
||||
maskInverted: true
|
||||
maskSource: maskSource
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
id: maskSource
|
||||
|
||||
anchors.fill: parent
|
||||
layer.enabled: true
|
||||
visible: false
|
||||
|
||||
CustomRect {
|
||||
readonly property int extraWidth: radius
|
||||
|
||||
color: "white"
|
||||
implicitHeight: panels.drawing.height
|
||||
implicitWidth: panels.drawing.width + extraWidth
|
||||
radius: drawingBg.radius
|
||||
x: -extraWidth + root.borderThickness + panels.drawing.x
|
||||
y: panels.drawing.y + bar.implicitHeight
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user