blob: 52cfaf0c58e792c0f9034612bf509eef1771bbda (
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
43
44
45
46
47
48
49
50
51
|
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
import QtQuick
Item {
id: top
property string topText: "Mon"
property string middleIcon: "sunny"
property string bottomText: "22*/23*"
implicitHeight: dayText.implicitHeight + width + tempText.implicitHeight + 20
Text {
id: dayText
horizontalAlignment: Text.AlignHCenter
width: parent.width
text: top.topText
color: "white"
font.pixelSize: 24
anchors.top: parent.top
anchors.margins: 10
anchors.horizontalCenter: parent.horizontalCenter
}
WeatherIcon {
id: icon
weatherIcon: top.middleIcon
width: height
anchors.top: dayText.bottom
anchors.bottom: tempText.top
anchors.margins: 10
anchors.horizontalCenter: parent.horizontalCenter
}
Text {
id: tempText
horizontalAlignment: Text.AlignHCenter
width: top.width
text: top.bottomText
font.pixelSize: 16
anchors.bottom: parent.bottom
anchors.margins: 10
anchors.horizontalCenter: parent.horizontalCenter
color: "white"
}
}
|