blob: 0de64264ba4f75775c8b265a8b46402bf625f30e (
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
|
// Copyright (C) 2022 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
import QtQuick
import QtQuick.Templates as T
T.AbstractDayOfWeekRow {
id: control
implicitWidth: Math.max(background ? background.implicitWidth : 0,
contentItem.implicitWidth + leftPadding + rightPadding)
implicitHeight: Math.max(background ? background.implicitHeight : 0,
contentItem.implicitHeight + topPadding + bottomPadding)
spacing: 6
topPadding: 6
bottomPadding: 6
font.bold: true
//! [delegate]
delegate: Text {
text: shortName
font: control.font
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
required property string shortName
}
//! [delegate]
//! [contentItem]
contentItem: Row {
spacing: control.spacing
Repeater {
model: control.source
delegate: control.delegate
}
}
//! [contentItem]
}
|