-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.slint
122 lines (106 loc) · 3.54 KB
/
mainwindow.slint
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
import { Button, VerticalBox } from "std-widgets.slint";
import { GridBox , HorizontalBox} from "std-widgets.slint";
import { Xkcd, XkcdWidget } from "xkcdwidget.slint";
import { ForecastWidget, Forecast } from "forecastwidget.slint";
import { FoodTrackerWidget, FoodTracking} from "foodtrackerwidget.slint";
import { StopPlaceData, TransportationWidget } from "transportation.slint";
import { CalendarWidget, Event } from "calendarwidget.slint";
import "./assets/Bagoss.ttf";
import "./assets/FiraMono-Regular.ttf";
import { SeasonEffects, Snowflake, SpookyFace, Bat } from "seasons.slint";
export component MainWindow inherits Window {
in property <string> time: "12:34";
in property <string> date: "Mandag 5. august";
in property <Forecast> todayForecast: {
temp: "-1",
precipitation: "2",
icon: @image-url("../img/weather/partlycloudy_day.png")
};
in property <Forecast> tomorrowForecast: {
temp: "-1",
precipitation: "2",
icon: @image-url("../img/weather/partlycloudy_day.png")
};
in property <Xkcd> xkcd: {
title: "Lorem Ipsum",
image: @image-url("../img/xkcd2.png"),
flavor_text: "Dolor sit ametDolor sit ametDolor sit ametDolor sit ametDolor sit ametDolor sit ametDolor sit ametDolor sit ametDolor sit ametDolor sit ametDolor sit ametDolor sit ametDolor sit amet"
};
in property <FoodTracking> foodTracking: {
active: false,
resturant_name: "McDonalds",
minutes_remaining: "5",
};
in property <[Event]> events: [{
summary: "Placeholder calendar event",
date: "31. April",
}];
in property <[Snowflake]> snowflakes;
in-out property <SpookyFace> spooky_face;
in-out property <Bat> bat;
in property <[StopPlaceData]> stopPlacesData: [
{
stopName: "Placeholder",
stopDataRows: [
{
transportMode: @image-url("../img/transport/walk.png"),
publicCode: 0,
destinationFrontText: "Månen",
departureTime: "Nå",
realtime: false,
}
]
}
];
in property <int> name;
title: "Infoskjerm";
//TODO: Set programmatically?
no-frame: true;
//width: 1080px;
height: 1900px;
background: #0C0C27;
default-font-family: "Bagoss";
SeasonEffects {
snow: snowflakes;
spooky_face: spooky_face;
bat: bat;
VerticalLayout {
width: 100%;
padding: 3rem;
spacing: 4rem;
alignment: start;
HorizontalLayout {
width: 100%;
alignment: space-between;
Text {
font-size: 2.5rem;
color: #FEFBE6;
text: date;
}
Text {
color: #FEFBE6;
font-size: 2.5rem;
text: time;
}
}
ForecastWidget {
today: todayForecast;
tomorrow: tomorrowForecast;
}
if foodTracking.active: FoodTrackerWidget {
tracking: foodTracking;
}
CalendarWidget {
events: events;
meetings: [];
}
TransportationWidget {
stopPlacesData: stopPlacesData;
}
XkcdWidget {
max-height: 30rem;
xkcd: xkcd;
}
}
}
}