forked from ubports/camera-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MediaInfoPopover.qml
48 lines (41 loc) · 1.27 KB
/
MediaInfoPopover.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
import QtQuick 2.4
import Ubuntu.Components 1.3
import Ubuntu.Components.Popups 1.3
Popover {
id: infoPopover
property Image currentMedia: null
property var model: null
autoClose: true
Item {
height: childrenRect.height + units.gu(4)
anchors {
centerIn: parent
margins: units.gu(2)
}
Column {
anchors {
centerIn: parent
}
spacing:units.gu(1)
Label {
text:i18n.tr("Media Information");
textSize: Label.Large
color: theme.palette.normal.overlayText
}
Label {
text:i18n.tr("Name : %1".arg(infoPopover.model.fileName))
}
Label {
text:i18n.tr("Type : %1").arg(infoPopover.model.fileType)
}
Label {
visible:null !== infoPopover.currentMedia;
text:visible ? i18n.tr("Width : %1").arg( infoPopover.currentMedia.sourceSize.width) : "";
}
Label {
visible:null !== infoPopover.currentMedia;
text: visible ? i18n.tr("Height : %1").arg( infoPopover.currentMedia.sourceSize.height) : "";
}
}
}
}