TG-PlatformPlus/qml/debug/calibrate/common/QxTitleButton.qml

57 lines
1.1 KiB
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: ""
property var isSelected: false
width: row.width
height: 45
Image {
source: bgmSource
anchors.fill: parent
// fillMode: Image.Tile
}
Row
{
id: row
anchors.centerIn: parent
Image {
width: 20
height: 20
source: iconSource
}
Text {
text: self.text
font.pixelSize: 18
font.family: customFontLoader.name
font.weight: Font.Medium
color: textColor
}
spacing: 9
}
Rectangle{
width: parent.width
visible: isSelected
anchors.bottom: parent.bottom
height: 2
radius: 9
color: "#007EFF"
}
MouseArea{
anchors.fill: parent
onClicked: {
self.clicked()
}
}
}