45 lines
933 B
QML
45 lines
933 B
QML
import QtQuick
|
|
import QtQuick.Controls
|
|
// import "../Style"
|
|
Item {
|
|
id: self
|
|
signal clicked
|
|
property var text: ""
|
|
property var iconSource: ""
|
|
property var bgmSource: ""
|
|
property var textColor: ""
|
|
Image {
|
|
source: bgmSource
|
|
anchors.fill: parent
|
|
// fillMode: Image.Tile
|
|
}
|
|
|
|
Image {
|
|
width: 30
|
|
height: 30
|
|
source: iconSource
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
anchors.left: parent.left
|
|
anchors.leftMargin: 22
|
|
}
|
|
|
|
Text {
|
|
text: self.text
|
|
font.pixelSize: 20
|
|
color: textColor
|
|
font.family: customFontLoader.name
|
|
font.weight: Font.Medium
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
anchors.right: parent.right
|
|
anchors.rightMargin: 22
|
|
}
|
|
|
|
MouseArea{
|
|
anchors.fill: parent
|
|
onClicked: {
|
|
self.clicked()
|
|
}
|
|
}
|
|
|
|
}
|