1// Copyright © SixtyFPS GmbH <info@slint.dev>
2// SPDX-License-Identifier: MIT
3import { Palette,Measurements,Colors, Style } from "../common.slint";
4import { Info } from "info.slint";
5import { HaText } from "./general/haText.slint";
6
7export component TimeInfo inherits Info {
8 in property <int> index;
9 in property <int> hours: 3;
10 in property <int> minutes: 15;
11 HorizontalLayout {
12 alignment: center;
13 spacing: 20px;
14 HorizontalLayout {
15 alignment: center;
16 HaText {
17 text: hours;
18 horizontal-alignment: center;
19 vertical-alignment: center;
20 color: Palette.info-foreground;
21 font-size: Style.H1-font-size;
22 }
23
24 HaText {
25 text: ":";
26 horizontal-alignment: center;
27 vertical-alignment: center;
28 color: Palette.info-foreground;
29 font-size: Style.H1-font-size;
30 }
31
32 HaText {
33 text: minutes;
34 horizontal-alignment: center;
35 vertical-alignment: center;
36 color: Palette.info-foreground;
37 font-size: Style.H1-font-size;
38 }
39
40 HaText {
41 text: " PM";
42 horizontal-alignment: center;
43 vertical-alignment: center;
44 color: Palette.info-foreground;
45 font-size: Style.H2-font-size;
46 }
47 }
48
49 date := Rectangle {
50 y: root.height * 0.15;
51 height: root.height * 0.7;
52 border-radius: 7px;
53 width: self.height;
54 Rectangle {
55 height: 30%;
56 y: 0;
57 HaText {
58 text: "Oct";
59 font-size: Style.H3-font-size;
60 }
61 }
62
63 HaText {
64 text: "18";
65 y: parent.height * 0.3;
66 color: Palette.info-foreground;
67 font-size: Style.H2-font-size;
68 font-weight: 400;
69 }
70 }
71 }
72}
73