aboutsummaryrefslogtreecommitdiffstats
path: root/examples/demos/graphs_csv/components/HorizontalHeaderDelegate.qml
blob: a91c650ee93533ab03477fac556b50e6b722aa8b (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) 2025 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause

pragma ComponentBehavior: Bound

import QtQuick
import qtgraphscsv

Rectangle {
    id: horizontalHeaderViewDelegate

    property color textColor
    property color borderColor
    required property string display

    readonly property font horizontalTitleFont: ({
            family: "Inter",
            weight: 600 * Units.px,
            pixelSize: 12 * Units.px,
            letterSpacing: 0 * Units.px,
            bold: false
        })

    color: "transparent"
    implicitHeight: 31 * Units.px
    implicitWidth: 63 * Units.px
    Text {
        id: txv

        anchors.right: horizontalHeaderViewDelegate.right
        anchors.rightMargin: 2 * Units.px
        anchors.bottom: horizontalHeaderViewDelegate.bottom
        anchors.bottomMargin: 10 * Units.px
        color: horizontalHeaderViewDelegate.textColor
        text: horizontalHeaderViewDelegate.display
        font: horizontalHeaderViewDelegate.horizontalTitleFont

        horizontalAlignment: Text.AlignRight
        verticalAlignment: Text.AlignBottom
        elide: Text.ElideRight
    }
}