forked from Shinonome/dots-hyprland
ai chat: prevent function call message from abrupt jumps
This commit is contained in:
@@ -18,6 +18,7 @@ ListView {
|
|||||||
property real removeOvershoot: 20 // Account for gaps and bouncy animations
|
property real removeOvershoot: 20 // Account for gaps and bouncy animations
|
||||||
property int dragIndex: -1
|
property int dragIndex: -1
|
||||||
property real dragDistance: 0
|
property real dragDistance: 0
|
||||||
|
property bool popin: true
|
||||||
|
|
||||||
function resetDrag() {
|
function resetDrag() {
|
||||||
root.dragIndex = -1
|
root.dragIndex = -1
|
||||||
@@ -27,7 +28,7 @@ ListView {
|
|||||||
add: Transition {
|
add: Transition {
|
||||||
animations: [
|
animations: [
|
||||||
Appearance?.animation.elementMove.numberAnimation.createObject(this, {
|
Appearance?.animation.elementMove.numberAnimation.createObject(this, {
|
||||||
properties: "opacity,scale",
|
properties: popin ? "opacity,scale" : "opacity",
|
||||||
from: 0,
|
from: 0,
|
||||||
to: 1,
|
to: 1,
|
||||||
}),
|
}),
|
||||||
@@ -40,7 +41,7 @@ ListView {
|
|||||||
property: "y",
|
property: "y",
|
||||||
}),
|
}),
|
||||||
Appearance?.animation.elementMove.numberAnimation.createObject(this, {
|
Appearance?.animation.elementMove.numberAnimation.createObject(this, {
|
||||||
properties: "opacity,scale",
|
properties: popin ? "opacity,scale" : "opacity",
|
||||||
to: 1,
|
to: 1,
|
||||||
}),
|
}),
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -162,6 +162,7 @@ int main(int argc, char* argv[]) {
|
|||||||
id: messageListView
|
id: messageListView
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: 10
|
spacing: 10
|
||||||
|
popin: false
|
||||||
|
|
||||||
property int lastResponseLength: 0
|
property int lastResponseLength: 0
|
||||||
|
|
||||||
@@ -175,6 +176,8 @@ int main(int argc, char* argv[]) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
add: null // Prevent function calls from being janky
|
||||||
|
|
||||||
Behavior on contentY {
|
Behavior on contentY {
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
id: scrollAnim
|
id: scrollAnim
|
||||||
|
|||||||
Reference in New Issue
Block a user