aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick3d/orderindependenttransparency/CustomInfoView.qml
blob: d327f18231d1de47fdefc68601c6238900935c85 (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
// Copyright (C) 2024 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

import QtQuick
import QtQuick.Controls

Item {
    id: root
    property int selection: 0
    property list<string> titles
    property list<string> contents

    Rectangle {
        anchors.fill: parent
        color: "#80404040"
        border.color: "#000000"
        border.width: 1
        opacity: 0.8
    }

    Label {
        id: title
        font.pixelSize: 18
        text: root.titles[root.selection]
        color: "white"
    }

    Text {
        id: content
        color: "white"
        font.pixelSize: 14
        anchors.top: title.bottom
        anchors.left: parent.left
        anchors.right: parent.right
        anchors.bottom: parent.bottom
        text: root.contents[root.selection]
    }
}