@@ -41,10 +41,17 @@ Item {
42 objectName: "appWindowWithShadow"
42 objectName: "appWindowWithShadow"
44+ readonly property real limit: root.height / 2
44− y: dragArea.distance
46+ y: root.closeable ? dragArea.distance : elastic(dragArea.distance)
45 width: parent.width
47 width: parent.width
46 height: parent.height
48 height: parent.height
50+ function elastic(distance) {
51+ var k = distance < 0 ? -limit : limit
52+ return k * (1 - Math.pow((k - 1) / k, distance))
48 BorderImage {
55 BorderImage {
50 fill: appWindow
57 fill: appWindow