File: ShellChrome.qml

package info (click to toggle)
qt6-wayland 6.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,368 kB
  • sloc: cpp: 51,119; xml: 9,949; ansic: 225; python: 22; makefile: 17; sh: 4
file content (33 lines) | stat: -rw-r--r-- 915 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

import QtQuick
import QtWayland.Compositor

ShellSurfaceItem {
    id: rootChrome

    onSurfaceDestroyed: {
        bufferLocked = true;
        destroyAnimation.start();
    }

    SequentialAnimation {
        id: destroyAnimation
        ParallelAnimation {
            NumberAnimation { target: scaleTransform; property: "yScale"; to: 2/height; duration: 150 }
            NumberAnimation { target: scaleTransform; property: "xScale"; to: 0.4; duration: 150 }
        }
        NumberAnimation { target: scaleTransform; property: "xScale"; to: 0; duration: 150 }
        ScriptAction { script: { rootChrome.destroy(); } }
    }

    transform: [
        Scale {
            id:scaleTransform
            origin.x: rootChrome.width / 2
            origin.y: rootChrome.height / 2

        }
    ]
}