status-desktop/ui/app/AppLayouts/Wallet/controls/CollectibleDetailsHeader.qml

62 lines
1.6 KiB
QML
Raw Normal View History

import QtQuick 2.13
import QtQuick.Layouts 1.13
import utils 1.0
import StatusQ.Components 0.1
import StatusQ.Core.Theme 0.1
import StatusQ.Core 0.1
import StatusQ.Controls 0.1
ColumnLayout {
id: root
signal goBack()
property alias primaryText: collectibleName.text
property alias secondaryText: collectibleId.text
property StatusImageSettings image: StatusImageSettings {
width: 40
height: 40
}
StatusFlatButton {
Layout.topMargin: -Style.current.xlPadding
Layout.leftMargin: -Style.current.xlPadding
visible: root.backButtonName != ""
icon.name: "arrow-left"
icon.width: 20
icon.height: 20
text: qsTr("Assets")
size: StatusBaseButton.Size.Large
onClicked: root.goBack()
}
RowLayout {
spacing: 8
StatusSmartIdenticon {
id: identiconLoader
Layout.alignment: Qt.AlignVCenter
image: root.image
}
StatusBaseText {
id: collectibleName
Layout.preferredWidth: Math.min(root.width - identiconLoader.width - collectibleId.width - 24, implicitWidth)
Layout.alignment: Qt.AlignVCenter
font.pixelSize: 28
lineHeight: 38
lineHeightMode: Text.FixedHeight
elide: Text.ElideRight
color: Theme.palette.directColor1
}
StatusBaseText {
id: collectibleId
Layout.alignment: Qt.AlignVCenter
font.pixelSize: 28
lineHeight: 38
lineHeightMode: Text.FixedHeight
color: Theme.palette.baseColor1
}
}
}