mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-09 13:56:10 +00:00
4ee21ada05
Introduced Style.svg() Style.png() Style.emoji() and Style.icon() in Style.qml. Those should be used to set the source in Images instead of using relative paths. Usage: Image { source: Style.svg("check) .... Also moved all Singletons inside a new "utils" folder and made it a QML module, to use import utils 1.0 instead of relative paths Closes #3678
54 lines
1.2 KiB
QML
54 lines
1.2 KiB
QML
import QtQuick 2.13
|
|
import QtGraphicalEffects 1.13
|
|
|
|
import utils 1.0
|
|
import "../../../../../shared"
|
|
|
|
Item {
|
|
property string collectibleName: "Furbeard"
|
|
property string collectibleId: "1423"
|
|
property url collectibleImage: Style.png("collectibles/placeholders/kitty")
|
|
property string collectibleDescription: "Avast ye! I'm the dread pirate Furbeard, and I'll most likely sleep"
|
|
|
|
id: root
|
|
width: parent.width
|
|
|
|
RoundedImage {
|
|
id: collectibleImage
|
|
width: 248
|
|
height: 248
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
source: root.collectibleImage
|
|
radius: 16
|
|
fillMode: Image.PreserveAspectCrop
|
|
}
|
|
|
|
TextWithLabel {
|
|
id: idText
|
|
//% "ID"
|
|
label: qsTrId("id")
|
|
text: root.collectibleId
|
|
anchors.top: collectibleImage.bottom
|
|
anchors.topMargin:0
|
|
}
|
|
|
|
|
|
TextWithLabel {
|
|
visible: !!root.collectibleDescription
|
|
id: descriptionText
|
|
//% "Description"
|
|
label: qsTrId("description")
|
|
text: root.collectibleDescription
|
|
anchors.top: idText.bottom
|
|
anchors.topMargin: 0
|
|
wrap: true
|
|
}
|
|
}
|
|
|
|
|
|
/*##^##
|
|
Designer {
|
|
D{i:0;autoSize:true;formeditorColor:"#ffffff";height:480;width:640}
|
|
}
|
|
##^##*/
|