forked from blue/squawk
changed my mind, gonna implement the feed on qt instead of qml, first tries, nothing working yet
This commit is contained in:
parent
4e6bd04b02
commit
e54cff0f0c
10 changed files with 200 additions and 100 deletions
|
@ -1,79 +0,0 @@
|
|||
import QtQuick 2.14
|
||||
import QtQuick.Controls 2.14
|
||||
import QtQuick.Layouts 1.14
|
||||
|
||||
ListView {
|
||||
id: list
|
||||
verticalLayoutDirection: ListView.BottomToTop
|
||||
|
||||
required model
|
||||
|
||||
delegate: RowLayout {
|
||||
id: root
|
||||
width: ListView.view.width
|
||||
|
||||
// placeholder
|
||||
Item {
|
||||
Layout.preferredWidth: root.layoutDirection === Qt.LeftToRight ? 5 : 10
|
||||
}
|
||||
|
||||
// Avatar {
|
||||
// id: avatar
|
||||
// visible: !sentByMe
|
||||
// avatarUrl: root.avatarUrl
|
||||
// Layout.alignment: Qt.AlignHCenter | Qt.AlignTop
|
||||
// name: root.senderName
|
||||
// Layout.preferredHeight: Kirigami.Units.gridUnit * 2.2
|
||||
// Layout.preferredWidth: Kirigami.Units.gridUnit * 2.2
|
||||
// }
|
||||
|
||||
Item {
|
||||
Layout.preferredWidth: content.width + 16
|
||||
Layout.preferredHeight: content.height + 16
|
||||
|
||||
Rectangle {
|
||||
id: messageBubble
|
||||
anchors.fill: parent
|
||||
|
||||
color: "blue"
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
id: content
|
||||
spacing: 5
|
||||
anchors.centerIn: parent
|
||||
|
||||
Label {
|
||||
text: model.sender
|
||||
}
|
||||
|
||||
Label {
|
||||
text: model.text
|
||||
wrapMode: Text.Wrap
|
||||
Layout.maximumWidth: root.width
|
||||
}
|
||||
|
||||
// message meta data: date, deliveryState
|
||||
RowLayout {
|
||||
Layout.bottomMargin: -4
|
||||
|
||||
Label {
|
||||
id: dateLabel
|
||||
text: model.date
|
||||
}
|
||||
|
||||
// Icon {
|
||||
// source: "edit-symbolic"
|
||||
// visible: model.correction
|
||||
// Layout.preferredHeight: 10
|
||||
// Layout.preferredWidth: 10
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
Layout.fillWidth: true
|
||||
}
|
||||
}
|
||||
}
|
|
@ -160,7 +160,5 @@
|
|||
<file>images/fallback/light/small/favorite.svg</file>
|
||||
<file>images/fallback/light/small/unfavorite.svg</file>
|
||||
<file>images/fallback/light/small/add.svg</file>
|
||||
|
||||
<file>qml/feed.qml</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue