summaryrefslogtreecommitdiff
path: root/Card.ui.qml
diff options
context:
space:
mode:
authorꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-05-02 16:16:58 +0700
committerꦌꦫꦶꦏ꧀ꦦꦿꦧꦮꦑꦩꦭ꧀ <erik@darapsa.co.id>2023-05-02 16:16:58 +0700
commit3d09c490431230050fb931da01adaebcb5bccb20 (patch)
tree1499415870a72657962ad0dc815bb52bff871031 /Card.ui.qml
parent53962d923fd225c155502a5cfc805a0c464781e3 (diff)
Card draft
Diffstat (limited to 'Card.ui.qml')
-rw-r--r--Card.ui.qml58
1 files changed, 58 insertions, 0 deletions
diff --git a/Card.ui.qml b/Card.ui.qml
new file mode 100644
index 0000000..e232f5a
--- /dev/null
+++ b/Card.ui.qml
@@ -0,0 +1,58 @@
+import QtQuick 2.15
+import QtQuick.Controls 2.15
+import QtQuick.Layouts 1.15
+import QtGraphicalEffects 1.15
+import Bootstrap 5.3
+
+Rectangle {
+ property string imageSource:
+ "https://offsetcode.com/themes/messenger/2.2.0/assets/img/avatars/6.jpg"
+ property string nameText: "Bill Marrow"
+ property string statusText: qsTr("last seen 3 days ago")
+
+ radius: 9.6
+ color: ApplicationWindow.window.Bootstrap.cardBg
+ implicitHeight: 88.5
+
+ Image {
+ id: image
+ anchors {
+ left: parent.left
+ leftMargin: 8
+ verticalCenter: parent.verticalCenter
+ }
+ source: imageSource
+ sourceSize {
+ width: 44
+ height: 44
+ }
+ layer.enabled: true
+ layer.effect: OpacityMask {
+ maskSource: Rectangle {
+ width: 44
+ height: 44
+ radius: 22
+ }
+ }
+ }
+
+ ColumnLayout {
+ spacing: 0
+ anchors {
+ left: image.right
+ leftMargin: 8
+ verticalCenter: parent.verticalCenter
+ }
+
+ Label {
+ text: nameText
+ wrapMode: Label.Wrap
+ Bootstrap.heading: 5
+ }
+
+ Label {
+ text: statusText
+ wrapMode: Label.Wrap
+ }
+ }
+}