TG-PlatformPlus/qml/debug/testfixture/common/QxTipButton.qml

45 lines
933 B
QML
Raw Normal View History

2026-03-02 14:29:58 +08:00
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()
}
}
}