summaryrefslogtreecommitdiffstats
path: root/QtLauncher/DetailViewIcon.qml
blob: 39f8e8c04991168ef2b83eaa67270eb4bf10f070 (plain)
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
34
35
36
37
38
39
40
41
42
// Copyright (C) 2023 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
pragma ComponentBehavior: Bound

import QtQuick

ApplicationIcon {
    id: root

    Image {
        id: selectedItem
        anchors.fill: root.preview
        source: "image://QtImageMask/"
        sourceSize: Qt.size(width, height)
        visible: root.isSelected
    }

    Image {
        id: glow
        anchors.centerIn: root.preview
        width: root.preview.width * 2.1
        height: root.preview.height * 2.1
        source: "images/glow.png"
        opacity: root.isSelected
        z: -1

        Behavior on opacity { OpacityAnimator { duration: 200; easing.type: Easing.InOutSine }}
    }

    Text {
        anchors.fill: parent
        anchors.margins: root.pageMargin
        verticalAlignment: Text.AlignVCenter
        horizontalAlignment: Text.AlignHCenter
        font.pixelSize: parent.height * 0.1
        text: root.name
        font.family: ViewSettings.appFont
        color: ViewSettings.pine
        wrapMode: Text.WordWrap
        visible: root.highlight && !root.isSelected
    }
}