diff options
| author | Erik Prabowo Kamal <erik@darapsa.org> | 2025-12-11 13:47:45 +0800 |
|---|---|---|
| committer | Erik Prabowo Kamal <erik@darapsa.org> | 2025-12-11 13:47:45 +0800 |
| commit | 2ae7f9fbcdae2b98fef194418cec522aaebe51e4 (patch) | |
| tree | e6dd28f4fec87a95f8a09b16a6dc4a8d42ef2374 /ChatGroup.ui.qml | |
| parent | d9e050dc8a74f45d43c84436ba8c2146d32b583a (diff) | |
Reindent
Diffstat (limited to 'ChatGroup.ui.qml')
| -rw-r--r-- | ChatGroup.ui.qml | 196 |
1 files changed, 98 insertions, 98 deletions
diff --git a/ChatGroup.ui.qml b/ChatGroup.ui.qml index 013a06c..e3165fa 100644 --- a/ChatGroup.ui.qml +++ b/ChatGroup.ui.qml @@ -4,111 +4,111 @@ import QtQuick.Layouts import Qt5Compat.GraphicalEffects Page { - property string titleText: qsTr("Bootstrap Community") + property string titleText: qsTr("Bootstrap Community") - header: ToolBar { - Label { - text: titleText - anchors.centerIn: parent - } - } + header: ToolBar { + Label { + text: titleText + anchors.centerIn: parent + } + } - ListView { - id: listView - anchors { - fill: parent - leftMargin: 20 - rightMargin: 20 - } - model: [11, 1, 6, 1, 11, 1, 7, 1, 11, 1] - delegate: Item { - width: listView.width - height: message.height + 16 + ListView { + id: listView + anchors { + fill: parent + leftMargin: 20 + rightMargin: 20 + } + model: [11, 1, 6, 1, 11, 1, 7, 1, 11, 1] + delegate: Item { + width: listView.width + height: message.height + 16 - ColumnLayout { - id: message - width: parent.width - layoutDirection: modelData === 1 ? Qt.RightToLeft : Qt.LeftToRight - anchors { - left: modelData !== 1 ? messageAvatar.right : undefined - right: modelData === 1 ? messageAvatar.left : undefined - bottom: parent.bottom - } - spacing: 8 + ColumnLayout { + id: message + width: parent.width + layoutDirection: modelData === 1 ? Qt.RightToLeft : Qt.LeftToRight + anchors { + left: modelData !== 1 ? messageAvatar.right : undefined + right: modelData === 1 ? messageAvatar.left : undefined + bottom: parent.bottom + } + spacing: 8 - Label { - id: messageText - text: qsTr("Hey, Marshall! How are you? Can you please change the color theme of the website to pink and purple? 😂") - wrapMode: Text.Wrap - rightPadding: 20 - leftPadding: 20 - bottomPadding: 16 - topPadding: 16 - Layout.maximumWidth: parent.width - (messageAvatar.width + 16) - background: Rectangle { - radius: 16 - color: modelData == 1 ? "#2787f5" : "#95aac9" - } - } + Label { + id: messageText + text: qsTr("Hey, Marshall! How are you? Can you please change the color theme of the website to pink and purple? 😂") + wrapMode: Text.Wrap + rightPadding: 20 + leftPadding: 20 + bottomPadding: 16 + topPadding: 16 + Layout.maximumWidth: parent.width - (messageAvatar.width + 16) + background: Rectangle { + radius: 16 + color: modelData == 1 ? "#2787f5" : "#95aac9" + } + } - Label { - id: messageTimestamp - text: qsTr("08:45 PM") - } - } + Label { + id: messageTimestamp + text: qsTr("08:45 PM") + } + } - Image { - id: messageAvatar - anchors { - left: modelData !== 1 ? parent.left : undefined - right: modelData === 1 ? parent.right : undefined - bottom: parent.bottom - } - source: "https://offsetcode.com/themes/messenger/2.2.0/assets/img/avatars/" - + modelData + ".jpg" - sourceSize { - width: 26 - height: 26 - } - layer { - enabled: true - effect: OpacityMask { - maskSource: Rectangle { - width: 26 - height: 26 - radius: 13 - } - } - } - } - } - } + Image { + id: messageAvatar + anchors { + left: modelData !== 1 ? parent.left : undefined + right: modelData === 1 ? parent.right : undefined + bottom: parent.bottom + } + source: "https://offsetcode.com/themes/messenger/2.2.0/assets/img/avatars/" + + modelData + ".jpg" + sourceSize { + width: 26 + height: 26 + } + layer { + enabled: true + effect: OpacityMask { + maskSource: Rectangle { + width: 26 + height: 26 + radius: 13 + } + } + } + } + } + } - footer: Pane { - RowLayout { - width: parent.width - Rectangle { - color: "#ebf1f7" - anchors.fill: parent - radius: 100 - } + footer: Pane { + RowLayout { + width: parent.width + Rectangle { + color: "#ebf1f7" + anchors.fill: parent + radius: 100 + } - TextArea { - id: messageField - Layout.fillWidth: true - placeholderText: qsTr("Type your message...") - wrapMode: TextArea.Wrap - Layout.leftMargin: 16 - } + TextArea { + id: messageField + Layout.fillWidth: true + placeholderText: qsTr("Type your message...") + wrapMode: TextArea.Wrap + Layout.leftMargin: 16 + } - RoundButton { - id: sendButton - text: qsTr("Send") - icon.source: "../qeduport/Material/svg/outlined/send.svg" - display: AbstractButton.IconOnly - Layout.margins: 8 - enabled: messageField.length > 0 - } - } - } + RoundButton { + id: sendButton + text: qsTr("Send") + icon.source: "../qeduport/Material/svg/outlined/send.svg" + display: AbstractButton.IconOnly + Layout.margins: 8 + enabled: messageField.length > 0 + } + } + } } |