2020-06-17 15:31:01 -04:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
2020-05-28 10:32:58 -04:00
|
|
|
import "../imports"
|
|
|
|
|
|
|
|
TabButton {
|
|
|
|
property string btnText: "Default Button"
|
2020-11-27 11:13:35 -04:00
|
|
|
property string tabColor: Style.current.blue
|
|
|
|
|
2020-05-28 10:32:58 -04:00
|
|
|
id: tabButton
|
|
|
|
width: tabBtnText.width
|
|
|
|
height: tabBtnText.height + 11
|
|
|
|
text: ""
|
|
|
|
padding: 0
|
|
|
|
background: Rectangle {
|
2020-07-02 11:14:31 -04:00
|
|
|
color: Style.current.transparent
|
2020-10-15 14:44:22 -04:00
|
|
|
border.width: 0
|
2020-05-28 10:32:58 -04:00
|
|
|
}
|
|
|
|
|
2020-06-19 14:06:58 -04:00
|
|
|
StyledText {
|
2020-05-28 10:32:58 -04:00
|
|
|
id: tabBtnText
|
|
|
|
text: btnText
|
|
|
|
font.weight: Font.Medium
|
|
|
|
font.pixelSize: 15
|
2021-01-12 12:40:48 +01:00
|
|
|
color: parent.checked || parent.hovered ? Style.current.textColor : Style.current.darkGrey
|
2020-05-28 10:32:58 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
Rectangle {
|
2021-01-12 12:40:48 +01:00
|
|
|
visible: parent.checked || parent.hovered
|
|
|
|
color: parent.checked ? tabColor : Style.current.secondaryBackground
|
2020-05-28 10:32:58 -04:00
|
|
|
anchors.bottom: parent.bottom
|
2021-01-12 12:40:48 +01:00
|
|
|
width: 40
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
2020-05-28 10:32:58 -04:00
|
|
|
height: 3
|
|
|
|
radius: 4
|
|
|
|
}
|
2021-01-12 12:40:48 +01:00
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
cursorShape: Qt.PointingHandCursor
|
|
|
|
anchors.fill: parent
|
|
|
|
onPressed: mouse.accepted = false
|
|
|
|
}
|
2020-05-28 10:32:58 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
/*##^##
|
|
|
|
Designer {
|
|
|
|
D{i:0;formeditorColor:"#ffffff";formeditorZoom:1.75}
|
|
|
|
}
|
|
|
|
##^##*/
|