summaryrefslogtreecommitdiff
path: root/qml
diff options
context:
space:
mode:
authorJavier S. Pedro <maemo@javispedro.com>2013-04-05 00:19:21 +0200
committerJavier S. Pedro <maemo@javispedro.com>2013-04-05 00:19:21 +0200
commita4626f5306ed3c5e52c28bb49d61ec50c7c2f329 (patch)
tree471a48e17021cb969a9b76bce2010c83e90e7620 /qml
parent37139c96f04f781b053feefdbb5b3d28b2bcfc11 (diff)
downloadtapasboard-a4626f5306ed3c5e52c28bb49d61ec50c7c2f329.tar.gz
tapasboard-a4626f5306ed3c5e52c28bb49d61ec50c7c2f329.zip
add avatars to topic view
Diffstat (limited to 'qml')
-rw-r--r--qml/TopicPage.qml32
1 files changed, 30 insertions, 2 deletions
diff --git a/qml/TopicPage.qml b/qml/TopicPage.qml
index 9835a06..ebaa2c6 100644
--- a/qml/TopicPage.qml
+++ b/qml/TopicPage.qml
@@ -77,23 +77,51 @@ Page {
spacing: 2
Item {
+ id: authorInfo
+
width: parent.width
height: childrenRect.height
+ Image {
+ id: authorIcon
+ height: 48
+ width: 48
+ fillMode: Image.PreserveAspectFit
+ source: model.icon
+ sourceSize.height: 48
+ }
+
Text {
- anchors.top: parent.top
- anchors.left: parent.left
+ id: authorName
text: model.userName
font: UiConstants.SmallTitleFont
textFormat: Text.PlainText
}
+
Text {
+ id: authorTime
anchors.top: parent.top
anchors.right: parent.right
text: model.humanTime
font: UiConstants.SubtitleFont
textFormat: Text.PlainText
}
+
+ states: State {
+ name: "with-image"
+ when: authorIcon.status === Image.Ready
+
+ AnchorChanges {
+ target: authorName
+ anchors.bottom: authorIcon.bottom
+ anchors.left: authorIcon.right
+ }
+
+ PropertyChanges {
+ target: authorName
+ anchors.leftMargin: UiConstants.ButtonSpacing
+ }
+ }
}
Text {