TG-PlatformPlus/qml/debug/logviewer/common/QxTabButton.qml

46 lines
870 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: ""
property var isSelected: false
width: row.width
height: 65
Row
{
id: row
anchors.centerIn: parent
Text {
text: self.text
font.family: customFontLoader.name
font.weight: Font.Medium
font.pixelSize: 16
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()
}
}
}