summaryrefslogtreecommitdiff
path: root/qml
diff options
context:
space:
mode:
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 {