This repository was archived by the owner on Jan 28, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathScheduleGridDelegate.qml
64 lines (52 loc) · 1.87 KB
/
ScheduleGridDelegate.qml
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
import QtQuick 2.0
import "functions.js" as F
import "Theme.js" as Theme
BackgroundItem {
id: scheduleGridDelegate
property int startTime;
property int endTime;
// property alias roomShort: roomLabel.text;
property alias roomColor: roomColorLabel.color;
property string speakers_str;
property string topic;
property int currentTimestamp;
property bool inFavorites: false;
clip: true;
border.color: Theme.background_color_pressed;
// border.color: inFavorites ? Qt.lighter(Theme.header_color) : Theme.background_color_pressed;
Text {
id: roomColorLabel
anchors.left: parent.left;
anchors.top: parent.top;
anchors.margins: Theme.paddingMedium
font.pointSize: Theme.tertiary_pointSize;
color: Theme.primary_color
// font.family: Theme.fontFamilyHeading
font.weight: Font.Bold
text: "|"
}
Text {
anchors.left: roomColorLabel.left;
anchors.top: parent.top;
anchors.right: parent.right;
anchors.bottom: parent.bottom;
anchors.margins: Theme.paddingMedium
font.pointSize: Theme.tertiary_pointSize;
text: (speakers_str !== "") ? (speakers_str + ": " + topic) : topic
color: (currentTimestamp > endTime)
? (scheduleGridDelegate.highlighted ? Theme.secondary_color_highlight : Theme.secondary_color)
: (scheduleGridDelegate.highlighted ? Theme.primary_color_highlight : Theme.primary_color)
wrapMode: Text.Wrap;
textFormat: Text.RichText;
}
Image {
visible: inFavorites;
source: "./images/ic_favorite_white_48dp.png"
anchors.right: parent.right;
anchors.bottom: parent.bottom;
fillMode: Image.PreserveAspectFit;
height: 24;
anchors.margins: Theme.paddingMedium;
opacity: 0.5;
}
}