1
0

qml: create wallet details drawer

This commit is contained in:
Sander van Grieken
2022-10-28 10:43:34 +02:00
parent df2d0f4e1f
commit 7028435daa
3 changed files with 280 additions and 70 deletions

View File

@@ -4,9 +4,10 @@ import QtQuick.Controls 2.3
import QtQuick.Controls.Material 2.0
Rectangle {
radius: constants.paddingXSmall
width: layout.width
height: layout.height
id: root
radius: height/2
implicitWidth: layout.implicitWidth
implicitHeight: layout.implicitHeight
color: 'transparent'
border.color: Material.accentColor
@@ -14,8 +15,40 @@ Rectangle {
property alias font: label.font
property alias labelcolor: label.color
property string iconSource
RowLayout {
id: layout
spacing: 0
Item {
// spacer
visible: iconSource
Layout.preferredWidth: constants.paddingSmall
Layout.preferredHeight: 1
}
Image {
visible: iconSource
Layout.preferredWidth: constants.iconSizeSmall
Layout.preferredHeight: constants.iconSizeSmall
source: iconSource
}
Item {
// spacer
visible: iconSource
Layout.preferredWidth: constants.paddingXXSmall
Layout.preferredHeight: 1
}
Rectangle {
visible: iconSource
Layout.preferredHeight: root.height
Layout.preferredWidth: 1
color: root.color
border.color: root.border.color
}
Label {
id: label
@@ -24,6 +57,7 @@ Rectangle {
Layout.topMargin: constants.paddingXXSmall
Layout.bottomMargin: constants.paddingXXSmall
font.pixelSize: constants.fontSizeXSmall
color: root.border.color
}
}
}