48 lines
1.2 KiB
QML
48 lines
1.2 KiB
QML
import QtQuick
|
|
import QtQuick.Layouts
|
|
import QtQuick.Controls
|
|
import FluentUI.Controls
|
|
import FluentUI.impl
|
|
import QtQuick.Controls.impl
|
|
import QtQuick.Templates as T
|
|
|
|
T.TabButton {
|
|
id: control
|
|
|
|
implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
|
|
implicitContentWidth + leftPadding + rightPadding)
|
|
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
|
|
implicitContentHeight + topPadding + bottomPadding)
|
|
|
|
padding: 6
|
|
spacing: 6
|
|
|
|
icon.width: 24
|
|
icon.height: 24
|
|
icon.color: checked ? control.palette.windowText : control.palette.brightText
|
|
|
|
contentItem: Rectangle {
|
|
color: "transparent"
|
|
Label {
|
|
id: lbl_txt
|
|
text: control.text
|
|
color: "#fff"
|
|
}
|
|
Rectangle{
|
|
color: "#fff"
|
|
width: lbl_txt.width
|
|
height: 2
|
|
anchors.left: parent.left
|
|
anchors.bottom: parent.bottom
|
|
anchors.bottomMargin: -8
|
|
visible: checked
|
|
}
|
|
}
|
|
|
|
background: Rectangle {
|
|
implicitHeight: 40
|
|
color: "transparent"
|
|
}
|
|
}
|
|
|