fix: merge two strokecanvas into one + better cursorShape and pointer handling
This commit is contained in:
+13
-13
@@ -134,25 +134,25 @@ Item {
|
||||
Behavior on rsx {
|
||||
enabled: !selectArea.pressed && root.mode === "select"
|
||||
|
||||
ExAnim {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
Behavior on rsy {
|
||||
enabled: !selectArea.pressed && root.mode === "select"
|
||||
|
||||
ExAnim {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
Behavior on sh {
|
||||
enabled: !selectArea.pressed && root.mode === "select"
|
||||
|
||||
ExAnim {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
Behavior on sw {
|
||||
enabled: !selectArea.pressed && root.mode === "select"
|
||||
|
||||
ExAnim {
|
||||
Anim {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -240,19 +240,19 @@ Item {
|
||||
to: 0
|
||||
}
|
||||
|
||||
ExAnim {
|
||||
Anim {
|
||||
properties: "rsx,rsy"
|
||||
target: root
|
||||
to: 0
|
||||
}
|
||||
|
||||
ExAnim {
|
||||
Anim {
|
||||
property: "sw"
|
||||
target: root
|
||||
to: root.screen.width
|
||||
}
|
||||
|
||||
ExAnim {
|
||||
Anim {
|
||||
property: "sh"
|
||||
target: root
|
||||
to: root.screen.height
|
||||
@@ -290,6 +290,7 @@ Item {
|
||||
anchors.fill: parent
|
||||
inkColor: root.inkColor
|
||||
layer.enabled: true
|
||||
selection: selectionRect
|
||||
tool: root.mode === "edit" && root.tool !== "move" ? root.tool : "none"
|
||||
|
||||
layer.effect: MultiEffect {
|
||||
@@ -301,7 +302,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
CustomRect {
|
||||
id: overlay
|
||||
|
||||
anchors.fill: parent
|
||||
@@ -338,12 +339,11 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
CustomRect {
|
||||
id: border
|
||||
|
||||
border.color: Colors.palette.m3primary
|
||||
border.width: root.realBorderWidth
|
||||
color: "transparent"
|
||||
implicitHeight: selectionRect.implicitHeight + root.realBorderWidth * 2
|
||||
implicitWidth: selectionRect.implicitWidth + root.realBorderWidth * 2
|
||||
radius: root.realRounding > 0 ? root.realRounding + root.realBorderWidth : 0
|
||||
@@ -360,10 +360,13 @@ Item {
|
||||
SelectionHandles {
|
||||
id: handles
|
||||
|
||||
border: root.realBorderWidth
|
||||
selH: root.sh
|
||||
selW: root.sw
|
||||
selX: root.rsx
|
||||
selY: root.rsy
|
||||
selection: selectionRect
|
||||
tool: root.tool
|
||||
visible: root.mode === "edit" && root.tool === "move"
|
||||
|
||||
onBoundsChanged: (x, y, w, h) => {
|
||||
@@ -401,7 +404,4 @@ Item {
|
||||
onToolSelected: t => root.tool = t
|
||||
onUndoRequested: annotations.undo()
|
||||
}
|
||||
|
||||
component ExAnim: Anim {
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user